@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  h1 {
    @apply text-4xl lg:text-7xl font-bold;
  }
  h2 {
    @apply text-2xl lg:text-4xl font-bold;
  }
  h3 {
    @apply text-xl lg:text-3xl font-bold;
  }
  h4 {
    @apply text-xl lg:text-2xl font-bold;
  }
  h5 {
    @apply text-lg font-bold;
  }

  input,
  textarea {
    @apply placeholder-leadwell-medium-gray;
  }

  .devise-auth {
    h1 {
      @apply text-4xl font-black my-1.5;
    }
    h2 {
      @apply text-2xl font-bold my-1.5;
    }
    h3 {
      @apply text-xl font-bold my-1.5;
    }
    h4 {
      @apply text-xl font-bold my-1.5;
    }
    h5 {
      @apply text-lg font-bold;
    }

    label {
      @apply inline-block mt-2 mb-1;
    }

    input {
      &[type='text'],
      &[type='password'],
      &[type='email'] {
        @apply block shadow rounded-md border border-gray-200 outline-none px-3 py-2 mt-1 mb-2 w-full;
      }
    }

    input[type='submit'],
    input[type='button'] {
      @apply text-gray-900 bg-gray-100 rounded-lg py-3 px-5 inline-block font-medium cursor-pointer;
    }

    input[type='submit'] {
      @apply bg-leadwell-saturated-blue text-white;
    }

    .links a,
    .link {
      @apply text-leadwell-medium-blue hover:text-leadwell-dark-blue hover:underline;
    }
  }

  .menu {
    @apply flex flex-col items-stretch py-1.5 px-1 bg-white border border-leadwell-light-gray rounded-md text-leadwell-dark-gray shadow-lg;
  }

  .menu hr {
    @apply h-px mx-1 my-1.5 border-0 bg-leadwell-medium-gray;
  }

  .menu__item,
  .menu__heading {
    @apply px-3 rounded-md min-w-40;
  }

  .menu__group {
    @apply px-3 min-w-40 mt-3 pt-3 pb-0.5 text-sm font-semibold border-t border-t-leadwell-medium-gray;
  }

  .menu__item {
    @apply py-2.5 flex flex-row items-center gap-3 text-base font-semibold has-[:checked]:bg-leadwell-light-blue text-leadwell-dark-blue;
  }

  .menu__heading ~ .menu__item {
    @apply pl-6;
  }

  .menu__item--selected {
    @apply bg-leadwell-medium-gray/50;
  }

  .menu__heading {
    @apply pt-4 pb-0.5 text-lg font-semibold;
  }

  a.menu__item,
  label.menu__item,
  form.menu__item {
    @apply cursor-pointer hover:bg-leadwell-dark-blue hover:text-white hover:no-underline;
  }

  .menu--compact .menu__item {
    @apply py-1.5 text-sm gap-2;
  }

  .menu--compact hr {
    @apply my-1;
  }

  .blog-content {
    h1 {
      @apply text-4xl text-balance lg:text-5xl font-semibold my-5 text-leadwell-dark-blue;
    }

    h2 {
      @apply text-2xl text-balance lg:text-4xl font-semibold my-4 text-leadwell-dark-blue;
    }

    h3 {
      @apply text-xl text-balance lg:text-3xl font-semibold my-3 text-leadwell-dark-blue;
    }

    h4 {
      @apply text-xl text-balance lg:text-2xl font-semibold my-2 text-leadwell-dark-blue;
    }

    h5 {
      @apply text-lg text-balance font-semibold my-2 text-leadwell-dark-blue;
    }

    h5 {
      @apply text-base text-balance font-semibold my-2 text-leadwell-dark-blue;
    }

    p {
      @apply my-2 text-lg;
    }
  }

  .bg-leadwell-gradient {
    @apply text-white  bg-gradient-to-br from-leadwell-saturated-blue to-leadwell-dark-blue hover:bg-gradient-to-br hover:from-leadwell-light-blue hover:to-leadwell-saturated-blue;
  }

  .group-bg-leadwell-gradient {
    @apply text-white  bg-gradient-to-br from-leadwell-saturated-blue to-leadwell-dark-blue group-hover:bg-gradient-to-br group-hover:from-leadwell-light-blue group-hover:to-leadwell-saturated-blue;
  }

  .video-player > iframe {
    @apply max-w-full aspect-video h-auto rounded-lg;
  }

  @keyframes lwFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes lwFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
  }
  @keyframes lwFloatSoft {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
  }
  @keyframes lwPulseDot {
    0%, 100% { box-shadow: 0 0 0 3px rgba(93,174,93,0.2); }
    50%      { box-shadow: 0 0 0 6px rgba(93,174,93,0.05); }
  }

  @keyframes lwDriftRight {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(30px); }
  }
  @keyframes lwDriftLeft {
    0%, 100% { transform: translateX(0); }
    50%      { transform: translateX(-25px); }
  }

  .lw-drift-a { animation: lwDriftRight 18s ease-in-out infinite; }
  .lw-drift-b { animation: lwDriftLeft 22s ease-in-out infinite; }
  .lw-drift-c { animation: lwDriftRight 26s ease-in-out infinite; }

  .lw-anim { animation: lwFadeUp .9s cubic-bezier(.22,.61,.36,1) both; }
  @keyframes lwMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }

  .lw-marquee { animation: lwMarquee 35s linear infinite; }

  .lw-float-a { animation: lwFloat 6s ease-in-out infinite; }
  .lw-float-b { animation: lwFloat 7s ease-in-out 0.8s infinite; }
  .lw-float-c { animation: lwFloatSoft 8s ease-in-out 0.35s infinite; }
  .lw-pulse-dot { animation: lwPulseDot 2s ease-in-out infinite; }

  [data-lw-nav] {
    transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease;
  }

  [data-lw-nav].lw-nav-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    border-color: rgba(4, 62, 99, 0.12);
    box-shadow: 0 4px 24px rgba(4, 62, 99, 0.06);
  }

  [data-lw-sr] {
    --lw-sr-x: 0px;
    --lw-sr-y: 0px;
    --lw-sr-scale: 1;
    --lw-sr-duration: 900ms;
    --lw-sr-delay: 0ms;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    transition:
      opacity var(--lw-sr-duration) cubic-bezier(.22, .61, .36, 1) var(--lw-sr-delay),
      transform var(--lw-sr-duration) cubic-bezier(.22, .61, .36, 1) var(--lw-sr-delay);
  }

  .lw-motion-ready [data-lw-sr]:not(.lw-sr-visible) {
    opacity: 0;
    transform: translate3d(var(--lw-sr-x), var(--lw-sr-y), 0) scale(var(--lw-sr-scale));
  }

  .lw-motion-ready [data-lw-sr].lw-sr-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }

  [data-lw-plx],
  [data-lw-breathe],
  [data-lw-fade-scroll] {
    will-change: transform, opacity;
  }

  @media (max-width: 767px) {
    .lw-motion-ready [data-lw-sr]:not(.lw-sr-visible) {
      transform: translate3d(0, 22px, 0) scale(var(--lw-sr-scale));
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .lw-anim,
    .lw-drift-a,
    .lw-drift-b,
    .lw-drift-c,
    .lw-float-a,
    .lw-float-b,
    .lw-float-c,
    .lw-marquee,
    .lw-pulse-dot {
      animation: none !important;
    }

    [data-lw-nav],
    [data-lw-sr],
    [data-lw-plx],
    [data-lw-breathe],
    [data-lw-fade-scroll] {
      transform: none !important;
      transition: none !important;
      will-change: auto !important;
    }

    [data-lw-sr],
    [data-lw-fade-scroll] {
      opacity: 1 !important;
    }
  }

  .device-frame {
    @apply relative rounded-2xl overflow-hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #0A2A40 0%, #043E63 100%);
    box-shadow: 0 4px 12px rgba(4,62,99,0.10), 0 24px 60px rgba(4,62,99,0.22);
    outline: 1px solid rgba(4,62,99,0.10);
    outline-offset: -1px;
  }

  /* Calendly injects its popup and loads external CSS from the layout. Keep these
     selectors specific so the host shell gives the iframe enough room. */
  .calendly-overlay {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 12px !important;
    overflow: hidden !important;
  }

  body .calendly-overlay .calendly-popup,
  .calendly-overlay .calendly-popup,
  .calendly-popup {
    width: min(1280px, calc(100vw - 24px)) !important;
    min-width: min(1100px, calc(100vw - 24px)) !important;
    max-width: none !important;
    height: min(1040px, calc(100vh - 24px)) !important;
    height: min(1040px, calc(100dvh - 24px)) !important;
    max-height: calc(100vh - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
  }

  body .calendly-overlay .calendly-popup-content,
  .calendly-overlay .calendly-popup-content,
  .calendly-popup-content {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
  }

  body .calendly-overlay .calendly-popup iframe,
  body .calendly-overlay .calendly-popup-content iframe,
  .calendly-overlay .calendly-popup iframe,
  .calendly-overlay .calendly-popup-content iframe {
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    height: 100% !important;
  }

  @media (max-width: 640px) {
    .calendly-overlay {
      align-items: flex-end !important;
      padding: 48px 0 0 !important;
    }

    body .calendly-overlay .calendly-popup,
    .calendly-overlay .calendly-popup,
    .calendly-popup {
      position: fixed !important;
      top: 48px !important;
      right: 0 !important;
      bottom: 0 !important;
      left: 0 !important;
      width: 100vw !important;
      min-width: 0 !important;
      height: calc(100vh - 48px) !important;
      height: calc(100dvh - 48px) !important;
      max-height: calc(100vh - 48px) !important;
      max-height: calc(100dvh - 48px) !important;
      margin: 0 !important;
      transform: none !important;
    }

    .calendly-popup-close {
      position: fixed !important;
      top: 14px !important;
      right: 14px !important;
      z-index: 2147483647 !important;
      width: 24px !important;
      height: 24px !important;
    }
  }
}

@layer components {
  .learning-hub a:hover {
    text-decoration: none;
  }

  .learning-hub-topic-card,
  .learning-hub-content-card {
    transition:
      border-color 180ms ease,
      box-shadow 180ms ease,
      transform 180ms ease,
      background-color 180ms ease;
  }

  .learning-hub-topic-card:hover {
    background-color: var(--leadwell-teal-50);
    box-shadow: 0 5px 14px rgb(var(--leadwell-teal-700-rgb) / 0.1);
    transform: translateY(-1px);
  }

  .learning-hub-content-card:hover {
    border-color: var(--leadwell-teal-700);
    box-shadow: 0 8px 20px rgb(var(--leadwell-teal-700-rgb) / 0.14);
    transform: translateY(-2px) scale(1.01);
  }

  @media (prefers-reduced-motion: reduce) {
    .learning-hub-topic-card,
    .learning-hub-content-card {
      transition: none;
    }

    .learning-hub-topic-card:hover,
    .learning-hub-content-card:hover {
      transform: none;
    }
  }

  .learning-hub-search [hidden] {
    display: none !important;
  }

  .learning-hub-search__field::-webkit-search-cancel-button,
  .learning-hub-search__field::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
  }

  .learning-hub-search__field-container {
    max-width: 0;
    pointer-events: none;
  }

  .learning-hub-search.is-open .learning-hub-search__field-container {
    width: min(18.75rem, calc(100vw - 8rem));
    max-width: 18.75rem;
    opacity: 1;
    border-color: #cbd5e1;
    pointer-events: auto;
  }

  .learning-hub-search__suggestions:empty {
    display: none;
  }

  .learning-hub-search__results-list {
    max-height: 25rem;
    overflow-y: auto;
    padding: 0.35rem;
  }

  .learning-hub-search__result {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    border-radius: 0.55rem;
    padding: 0.65rem;
    text-decoration: none;
  }

  .learning-hub-search__result:hover,
  .learning-hub-search__result:focus-visible {
    background: var(--leadwell-teal-50);
    outline: 2px solid var(--leadwell-teal-500);
    outline-offset: -2px;
    text-decoration: none;
  }

  .learning-hub-search__thumbnail {
    width: 5.5rem;
    flex: none;
    aspect-ratio: 16 / 9;
    border-radius: 0.4rem;
    object-fit: cover;
    background: #e2e8f0;
  }

  .learning-hub-search__result-copy {
    display: block;
    min-width: 0;
  }

  .learning-hub-search__result-title {
    display: block;
    color: var(--leadwell-dark-blue);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
  }

  .learning-hub-search__result-summary {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin-top: 0.2rem;
    color: #475569;
    font-size: 0.73rem;
    line-height: 1.35;
  }

  .learning-hub-search__result-duration {
    display: block;
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.7rem;
  }

  .learning-hub-search__empty {
    padding: 0.85rem;
    color: #475569;
    font-size: 0.85rem;
  }

  .learning-hub-workbook__top {
    border-bottom: 1px solid #cbd5e1;
    background: #f1f5f9;
  }

  .learning-hub-workbook__tab {
    position: relative;
    bottom: -1px;
    width: clamp(6rem, 24vw, 11.5rem);
    margin-top: 3px;
    border: 1px solid #cbd5e1;
    border-bottom-color: #cbd5e1;
    background: #e2e8f0;
    color: #475569;
    line-height: 1.2;
  }

  .learning-hub-workbook__tab:hover {
    background: #f8fafc;
    color: var(--leadwell-dark-blue);
  }

  .learning-hub-workbook__tab[aria-selected='true'] {
    z-index: 1;
    margin-top: 0;
    border-top: 3px solid var(--leadwell-teal-700);
    border-bottom-color: #fff;
    background: #fff;
    color: var(--leadwell-dark-blue);
    box-shadow: 0 -3px 8px rgb(15 23 42 / 8%);
  }

  .learning-hub-workbook__frame {
    display: block;
    height: auto;
    aspect-ratio: 612 / 792;
    background: #fff;
  }

  @media (prefers-reduced-motion: reduce) {
    .learning-hub-search__field-container {
      transition: none;
    }
  }
}
:root {
  --leadwell-white: oklch(100% 0 0);
  --leadwell-light-gray: oklch(96.92% 0.003 247.86);
  --leadwell-medium-gray: oklch(87.3% 0.0025 242.854);
  --leadwell-dark-gray: oklch(32.11% 0 0);

  --leadwell-dark-blue: oklch(35.08% 0.084 244.29);
  --leadwell-medium-blue: oklch(65.04% 0.074 220.6);
  --leadwell-saturated-blue: oklch(69.67% 0.1 214.98);
  --leadwell-faded-blue: oklch(69.08% 0.037 241.7);

  --leadwell-teal-50: #f0f9fb;
  --leadwell-teal-500: #45adc4;
  --leadwell-teal-700: #0e7490;
  --leadwell-teal-700-rgb: 14 116 144;

  --theme-text-primary: var(--leadwell-dark-gray);
  --theme-text-inverted: var(--leadwell-white);

  --theme-background-primary: var(--leadwell-white);
  --theme-background-secondary: var(--leadwell-light-gray);
  --theme-background-inverted: var(--leadwell-dark-blue);
}

body {
  background-color: var(--theme-background-secondary);
  color: var(--theme-text-primary);
}

a {
  color: var(--leadwell-dark-blue);

  &:hover {
    text-decoration: underline;
  }
}

[popover] {
  padding: 0;
  background: transparent;
  overflow: visible;
}
/* Settings / Admin "Edit employee" page (app/views/employees/_page and its
   sections). Tokens match profile.css: navy #043e63, teal #589aaf, border
   #dde4ea, muted #596c7b; red only for destructive actions. One 880px
   column, one card per section, single column on phones. */
.ep-page {
  --ep-navy: #043e63;
  --ep-teal: #589aaf;
  --ep-border: #dde4ea;
  --ep-border-soft: #e8edf1;
  --ep-muted: #596c7b;
  --ep-tint: #f3f8fa;
  --ep-tint-2: #edf5f7;
  --ep-fg: #1f3a4d;
  --ep-danger: #b42318;
  --ep-danger-soft: #fdecea;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding-bottom: 32px;
  color: var(--ep-fg);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
}
.ep-page [hidden] { display: none !important; }
.ep-page .field_with_errors { display: contents; }

/* Header */
.ep-crumb { margin: 0 0 14px; font-size: 13px; color: var(--ep-muted); }
.ep-crumb a { color: var(--ep-teal); text-decoration: none; }
.ep-crumb a:hover { text-decoration: underline; }
.ep-head { display: flex; align-items: center; gap: 14px 18px; margin-bottom: 24px; }
.ep-head h1 { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.15; letter-spacing: -.03em; color: var(--ep-navy); text-wrap: balance; }
.ep-head p { margin: 4px 0 0; font-size: 13px; color: var(--ep-muted); }
.ep-avatar { display: grid; place-items: center; flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; background: var(--ep-tint-2); color: var(--ep-navy); font-size: 18px; font-weight: 700; object-fit: cover; }
.ep-avatar--small { width: 34px; height: 34px; font-size: 12px; }
.ep-pill { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 4px 10px; border-radius: 999px; background: var(--ep-tint-2); color: var(--ep-navy); font-size: 11px; font-weight: 600; line-height: 1.4; letter-spacing: 0; vertical-align: middle; }
.ep-pill i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ep-teal); }
.ep-pill--inactive { background: var(--ep-danger-soft); color: var(--ep-danger); }

/* Cards */
.ep-card { margin-bottom: 18px; padding: 24px; background: #fff; border: 1px solid var(--ep-border); border-radius: 16px; box-shadow: 0 3px 14px rgba(4, 62, 99, .025); }
.ep-card__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.ep-card__head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 650; line-height: 1.4; letter-spacing: -.02em; color: var(--ep-navy); }
.ep-card__head p { margin: 3px 0 0; font-size: 13px; color: var(--ep-muted); }
.ep-icon { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: var(--ep-tint-2); color: var(--ep-teal); }
.ep-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ep-split { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.ep-split > .ep-card__head { margin-bottom: 0; }

/* Fields */
.ep-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.ep-field { min-width: 0; }
.ep-field--wide { grid-column: 1 / -1; }
.ep-field--end { align-self: end; }
.ep-label-row { display: flex; align-items: center; gap: 6px; min-height: 24px; margin-bottom: 6px; }
.ep-page label { margin: 0; font-size: 13px; font-weight: 600; color: var(--ep-navy); }
.ep-page .ep-input {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background-color: #fff;
  color: var(--ep-fg);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  box-shadow: none;
}
.ep-page select.ep-input { padding-right: 32px; }
.ep-page .ep-input:focus { border-color: var(--ep-teal); outline: 2px solid #a8d8e6; outline-offset: 2px; box-shadow: none; }
.ep-page .ep-input:disabled { background: #f6f8fa; color: #526c7d; opacity: 1; }
.ep-hint { margin: 6px 0 0; font-size: 12px; color: var(--ep-muted); }
.ep-error { margin: 6px 0 0; font-size: 12px; font-weight: 600; color: var(--ep-danger); }
.ep-alert { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #f3c7c2; border-left: 3px solid var(--ep-danger); border-radius: 0 8px 8px 0; background: var(--ep-danger-soft); color: #7a1b13; font-size: 13px; font-weight: 600; }
.ep-alert p { margin: 0; }
.ep-alert p + p { margin-top: 6px; }
.ep-checks { display: grid; gap: 4px; }
.ep-page .ep-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; font-weight: 500; color: var(--ep-fg); cursor: pointer; }
.ep-page :is(.ep-check, .ep-option) input { width: 18px; height: 18px; color: var(--ep-navy); accent-color: var(--ep-navy); }

/* Buttons */
.ep-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.ep-page .ep-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border: 1px solid var(--ep-navy);
  border-radius: 8px;
  background: var(--ep-navy);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(4, 62, 99, .08);
}
.ep-page .ep-btn:hover { background: #125473; border-color: #125473; }
.ep-page .ep-btn--secondary { background: #fff; color: var(--ep-navy); border-color: #cbd6df; box-shadow: none; }
.ep-page .ep-btn--secondary:hover { background: var(--ep-tint-2); border-color: #cbd6df; }
.ep-page .ep-btn--danger { background: var(--ep-danger); border-color: var(--ep-danger); }
.ep-page .ep-btn--danger:hover { background: #912018; border-color: #912018; }
.ep-page .ep-btn--quiet { padding: 8px 6px; background: none; border-color: transparent; color: var(--ep-muted); font-size: 13px; font-weight: 500; box-shadow: none; }
.ep-page .ep-btn--quiet:hover { background: none; border-color: transparent; color: var(--ep-danger); text-decoration: underline; }
.ep-page :is(a, button, input[type=submit], summary):focus-visible { outline: 2px solid var(--ep-teal); outline-offset: 3px; }
.ep-inline-form { display: inline; margin: 0; }

/* Save bar (unsaved_controller.js): the one Save for Personal, Work and
   Access. Without JavaScript a plain row at the end of the form (the .no-js
   rule: the layout's <html class="no-js">, which a head script removes at
   once); with it, fixed to the bottom of the window while something is
   unsaved. The controller publishes the bar's real height as
   --lw-bottom-bar, so the page gets exactly that much room underneath and
   the bar never covers the last card. */
.ep-savebar { margin: 0 0 18px; }
.no-js .ep-page .ep-savebar[hidden] { display: flex !important; }
.ep-savebar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.ep-savebar__status { margin: 0; font-size: 13px; font-weight: 500; color: var(--ep-muted); }
.ep-savebar__actions { display: flex; gap: 10px; margin-left: auto; }
.ep-savebar--fixed { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; margin: 0; border-top: 1px solid var(--ep-border); background: #fff; box-shadow: 0 -6px 18px rgba(4, 62, 99, .08); }
.ep-savebar--fixed .ep-savebar__inner { max-width: 880px; margin: 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
.ep-page.ep-page--savebar { padding-bottom: calc(32px + var(--lw-bottom-bar, 72px)); }
html:has(.ep-page--savebar) { scroll-padding-bottom: calc(16px + var(--lw-bottom-bar, 72px)); }

/* Team question: a tinted inset flowing out of Manager (a short teal stub
   joins the field to the panel's rule). */
.ep-move { position: relative; grid-column: 1 / -1; margin-left: 14px; padding: 18px 18px 20px; border-left: 3px solid var(--ep-teal); border-radius: 0 10px 10px 0; background: var(--ep-tint); }
.ep-move::before { content: ""; position: absolute; top: -14px; left: -3px; width: 3px; height: 14px; background: var(--ep-teal); }
.ep-move h3, .ep-leave h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 4px; font-size: 15px; font-weight: 650; line-height: 1.45; color: var(--ep-navy); text-wrap: balance; }
.ep-move > p, .ep-leave > p { margin: 0 0 14px; font-size: 13px; color: var(--ep-muted); }
.ep-options { display: grid; gap: 10px; margin: 0 0 14px; padding: 0; border: 0; }
.ep-page .ep-option { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; min-height: 44px; padding: 12px 14px; border: 1px solid var(--ep-border); border-radius: 10px; background: #fff; font-weight: 400; cursor: pointer; }
.ep-option:has(input:checked) { border-color: var(--ep-teal); box-shadow: inset 0 0 0 1px var(--ep-teal); }
.ep-option input { margin-top: 2px; }
.ep-option strong { display: block; font-size: 14px; font-weight: 600; color: var(--ep-navy); }
.ep-option small { display: block; margin-top: 2px; font-size: 12px; color: var(--ep-muted); }
.ep-page .ep-option--blocked { cursor: default; }
.ep-page .ep-option small.ep-blocked, .ep-blocked { margin: 6px 0 0; padding: 8px 10px; border: 1px dashed var(--ep-border); border-radius: 8px; background: #fff; color: var(--ep-fg); font-size: 12px; }
.ep-move-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }

/* Each question is a numbered step: a navy number on a rail, joined to the
   next shown step by a line. CSS counters skip a hidden step, so the
   numbers follow what is on screen. "What will change" closes the steps on
   a white inset: the outcome, not another question. */
.ep-steps { display: grid; gap: 18px; counter-reset: ep-step; }
.ep-steps > .ep-blocked { margin: 0; }
.ep-step { position: relative; min-width: 0; padding-left: 36px; counter-increment: ep-step; }
.ep-step::before { content: counter(ep-step); position: absolute; top: 1px; left: 0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ep-navy); color: #fff; font-family: "Montserrat", "Segoe UI", system-ui, sans-serif; font-size: 12px; font-weight: 650; line-height: 1; }
.ep-step:has(~ .ep-step:not([hidden]))::after { content: ""; position: absolute; top: 27px; bottom: -14px; left: 10px; width: 2px; border-radius: 1px; background: var(--ep-border); }
.ep-step > .ep-field { max-width: 420px; }
.ep-step .ep-options { margin: 0; }
.ep-page .ep-step__legend { display: block; min-height: 24px; margin: 0 0 6px; padding: 0; font-size: 13px; font-weight: 600; line-height: 24px; color: var(--ep-navy); }
.ep-review { padding: 14px; border: 1px solid var(--ep-border-soft); border-radius: 10px; background: #fff; }
.ep-review h4 { margin: 0 0 8px; font-size: 13px; font-weight: 650; line-height: 1.4; color: var(--ep-navy); }
.ep-review .ep-facts { margin: 0; }
.ep-review .ep-notes { margin-top: 10px; }
.ep-facts { grid-column: 1 / -1; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 4px 0 0; font-size: 13px; }
.ep-facts dt { color: var(--ep-muted); font-weight: 500; }
.ep-facts dd { margin: 0; color: var(--ep-fg); font-weight: 600; }
.ep-facts dd em { color: var(--ep-muted); font-style: normal; font-weight: 500; }
.ep-notes { grid-column: 1 / -1; display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--ep-muted); }
.ep-notes li { display: flex; gap: 8px; }
.ep-notes li::before { content: ""; flex-shrink: 0; width: 5px; height: 5px; margin-top: 7px; border-radius: 50%; background: var(--ep-teal); }
.ep-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Team members, time away and permission rows */
.ep-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ep-person { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--ep-border-soft); border-radius: 10px; }
.ep-person a { font-size: 13px; font-weight: 600; color: var(--ep-navy); text-decoration: none; }
.ep-person a:hover { color: var(--ep-teal); text-decoration: underline; }
.ep-person > div > span { display: block; font-size: 12px; color: var(--ep-muted); }
.ep-person .ep-pill { margin: 2px 0 0; }
.ep-rows { margin: 0; padding: 0; list-style: none; }
.ep-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 44px; padding: 10px 0; border-bottom: 1px solid var(--ep-border-soft); font-size: 13px; }
.ep-row:last-child { border-bottom: 0; }
.ep-row b { font-weight: 600; color: var(--ep-navy); }
.ep-row .ep-pill { margin-left: 6px; }
.ep-row .ep-hint { margin: 0; }
.ep-row__detail { display: block; color: var(--ep-muted); font-size: 12px; }
.ep-empty { margin: 0; padding: 16px; border-radius: 8px; background: #f6f8fa; color: var(--ep-muted); font-size: 13px; }
.ep-details { margin-top: 14px; border-top: 1px solid var(--ep-border-soft); }
.ep-details > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding-top: 8px; color: var(--ep-navy); font-size: 13px; font-weight: 600; list-style: none; cursor: pointer; }
.ep-page summary::-webkit-details-marker { display: none; }
.ep-details > summary::after { content: ""; width: 7px; height: 7px; margin-left: 4px; border-right: 2px solid var(--ep-teal); border-bottom: 2px solid var(--ep-teal); transform: rotate(45deg); transition: transform .15s; }
.ep-details[open] > summary::after { transform: rotate(-135deg); }
.ep-details__body { margin-top: 12px; }

/* Status */
.ep-status-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ep-status-line { flex: 1 1 260px; }
.ep-status-line p { margin: 0; font-size: 13px; color: var(--ep-muted); }
.ep-card > .ep-status-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ep-status-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.ep-disclose > summary { list-style: none; }
/* A refused block is scrolled into view on load (team_move_controller.js reveal), clear of the top bar. */
.ep-move, .ep-disclose { scroll-margin-top: 96px; }
/* One block open at a time: it takes the full width and the status line and other actions step aside. */
.ep-status-row:has(details[open]) > .ep-status-line,
.ep-status-actions:has(details[open]) > details:not([open]),
.ep-disclose[open] > summary { display: none; }
.ep-status-actions:has(details[open]) { flex-basis: 100%; }
.ep-disclose[open] { flex-basis: 100%; }
.ep-leave { margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--ep-border-soft); }
.ep-admin-only { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--ep-border-soft); color: var(--ep-muted); font-size: 12px; }
.ep-admin-only a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ep-danger); font-weight: 600; text-decoration: none; }
.ep-admin-only a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .ep-fields, .ep-move-fields { grid-template-columns: 1fr; }
  .ep-card { padding: 18px; border-radius: 12px; }
  .ep-head h1 { font-size: 24px; }
  .ep-facts { grid-template-columns: 1fr; gap: 2px 0; }
  .ep-facts dt { margin-top: 6px; }
  .ep-actions { flex-direction: column-reverse; align-items: stretch; }
  .ep-move { margin-left: 0; padding: 16px 14px 18px; }
  .ep-step > .ep-field { max-width: none; }
  .ep-savebar__actions { flex: 1 1 100%; }
  .ep-savebar__actions > * { flex: 1 1 0; }
  .ep-status-actions { flex: 1 1 100%; justify-content: stretch; }
  .ep-status-actions > details { flex: 1 1 100%; }
  .ep-split > .ep-disclose { flex: 1 1 100%; }
  .ep-disclose > summary { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .ep-details > summary::after { transition: none; } }

/* Searchable select (searchable_select_controller.js, select mode): a
   combobox input over a grouped listbox. */
.ep-combo { position: relative; }
.ep-page .ss-input { padding-right: 32px; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23596c7b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e"); background-position: right 8px center; background-repeat: no-repeat; background-size: 20px; }
.ss-list { position: absolute; z-index: 25; left: 0; right: 0; top: calc(100% + 4px); max-height: 300px; overflow-y: auto; padding: 6px 0; border: 1px solid #cbd6df; border-radius: 10px; background: #fff; box-shadow: 0 8px 24px rgba(4, 62, 99, .14); }
.ss-group { padding: 10px 14px 4px; color: #596c7b; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ss-option { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; color: #1f3a4d; font-size: 14px; cursor: pointer; }
.ss-option[aria-selected="true"] { font-weight: 600; color: #043e63; }
.ss-option.is-active, .ss-option:hover { background: #edf5f7; }
.ss-option[aria-disabled="true"] { color: #8a9aa6; cursor: default; }
.ss-empty { padding: 12px 14px; color: #596c7b; font-size: 13px; }
.ep-check--confirm { margin-top: 6px; font-size: 13px; }
.ep-tag { display: inline-flex; align-items: center; padding: 1px 8px; border: 1px solid #dde4ea; border-radius: 6px; background: #f3f8fa; color: #596c7b; font-size: 11px; font-weight: 600; }
.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-appearance: none;
  background-color: WHITE;
  background-image: none;
  border: 1px solid #747775;
  -webkit-border-radius: 4px;
  border-radius: 4px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: 'Roboto', arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  -webkit-transition:
    background-color 0.218s,
    border-color 0.218s,
    box-shadow 0.218s;
  transition:
    background-color 0.218s,
    border-color 0.218s,
    box-shadow 0.218s;
  vertical-align: middle;
  white-space: nowrap;
  width: auto;
  max-width: 400px;
  min-width: min-content;
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 12px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  -webkit-align-items: center;
  align-items: center;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  -webkit-flex-grow: 1;
  flex-grow: 1;
  font-family: 'Roboto', arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  -webkit-transition: opacity 0.218s;
  transition: opacity 0.218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:disabled {
  cursor: default;
  background-color: #ffffff61;
  border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents {
  opacity: 38%;
}

.gsi-material-button:disabled .gsi-material-button-icon {
  opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state,
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: #303030;
  opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
  -webkit-box-shadow:
    0 1px 2px 0 rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
  box-shadow:
    0 1px 2px 0 rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: #303030;
  opacity: 8%;
}
/* Shared "i" info tip: app/javascript/controllers/info_tip_controller.js.
   Opens on hover/focus where the device can hover; on touch it opens on tap
   and closes on a tap anywhere else or Escape. Brand tokens only. */
.lw-tip { position: relative; display: inline-flex; align-items: center; vertical-align: middle; }
.lw-tip__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 1px solid #dde4ea;
  border-radius: 50%;
  background: #fff;
  color: #589aaf;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  cursor: pointer;
}
.lw-tip__button:hover { border-color: #589aaf; }
.lw-tip__button:focus-visible { outline: 2px solid #589aaf; outline-offset: 2px; }
/* 44px touch target without growing the 22px circle. */
@media (pointer: coarse) {
  .lw-tip__button::before { content: ""; position: absolute; inset: -11px; }
}
/* The same tip on a labelled button (button_tip: a pill, a time). Its own
   classes give the look; this adds the pointer, focus ring and touch target. */
.lw-tip__trigger { position: relative; cursor: pointer; }
.lw-tip__trigger:focus-visible { outline: 2px solid #589aaf; outline-offset: 2px; }
@media (pointer: coarse) {
  .lw-tip__trigger::before { content: ""; position: absolute; inset: -12px -4px; }
}
.lw-tip__pop {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 30;
  box-sizing: border-box;
  width: max-content;
  max-width: min(320px, 80vw);
  padding: 10px 12px;
  border-radius: 8px;
  background: #043e63;
  color: #fff;
  box-shadow: 0 5px 15px rgba(4, 62, 99, .18);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  text-transform: none;
  letter-spacing: normal;
  white-space: normal;
  transform: translateX(var(--lw-tip-shift, 0px)); /* set by the controller to stay on screen */
}
.lw-tip__pop::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: calc(5px - var(--lw-tip-shift, 0px));
  border: 6px solid transparent;
  border-bottom-color: #043e63;
}
.lw-tip--right .lw-tip__pop { left: auto; right: 0; }
.lw-tip--right .lw-tip__pop::before { left: auto; right: calc(5px + var(--lw-tip-shift, 0px)); }
.lw-tip__pop[hidden] { display: none !important; }
@media (hover: hover) {
  /* !important + extra specificity so hover/focus beats the [hidden] rules,
     including page-scoped ones such as `.profile-page [hidden]`. */
  .lw-tip:hover .lw-tip__pop,
  .lw-tip:focus-within .lw-tip__pop { display: block !important; }
}
/* Escape on a hover/focus-opened tip (set by the controller). */
.lw-tip[data-dismissed] .lw-tip__pop { display: none !important; }
/* Profile-specific styling; colours follow the Support/Reports palette. */
.profile-page {
  --profile-navy: #043e63;
  --profile-teal: #589aaf;
  --profile-border: #dde4ea;
  --profile-muted: #596c7b;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  color: var(--profile-navy);
  padding-bottom: 32px;
}
.profile-page [hidden] { display: none !important; }
.profile-page__heading { margin: 0 0 28px; }
.profile-page__heading .profile-eyebrow {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #466f80;
}
.profile-page__heading h1 { margin: 0 0 8px; font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.035em; }
.profile-page__heading > p:last-child { font-size: 14px; color: var(--profile-muted); }
.profile-card {
  padding: 28px 32px;
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  box-shadow: 0 3px 14px rgba(4, 62, 99, .025);
}
.profile-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.profile-section-heading__main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.profile-icon-tile { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: #edf5f7; color: #589aaf; }
.profile-icon-tile svg { display: block; width: 20px; height: 20px; }
.profile-section-heading h2 { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 650; letter-spacing: -.02em; color: var(--profile-navy); }
.profile-section-heading__main > div { min-width: 0; padding-top: 1px; }
.profile-section-heading p { margin: 5px 0 0; font-size: 13px; color: var(--profile-muted); line-height: 1.6; }
.profile-badge { flex-shrink: 0; padding: 5px 10px; border-radius: 6px; background: #edf5f7; color: #365f70; font-size: 11px; font-weight: 600; line-height: 1.5; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.profile-fields--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.profile-field { min-width: 0; }
.profile-field--wide { grid-column: 1 / -1; }
.profile-field label { margin: 0; display: inline-block; font-size: 13px; font-weight: 600; color: var(--profile-navy); }
.profile-field__label { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.profile-page .profile-input {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 46px;
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background-color: #fff;
  color: #24465c;
  font-size: 14px;
  line-height: 1.5;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.profile-page select.profile-input { padding-right: 32px; }
.profile-page .profile-input:focus { border-color: var(--profile-teal); outline: 2px solid #a8d8e6; outline-offset: 2px; }
.profile-page .profile-input:disabled { background: #f6f8fa; color: #526c7d; opacity: 1; border-color: #e4eaf0; -webkit-text-fill-color: #526c7d; }
.profile-help { margin: 6px 0 0; font-size: 12px; line-height: 1.65; color: var(--profile-muted); }
.profile-description { margin: 0 0 8px; font-size: 13px; color: #456073; line-height: 1.7; max-width: 70ch; }
.profile-security { margin-top: 24px; padding-top: 24px; border-top: 1px solid #e8edf1; }
.profile-security > .profile-field { max-width: 100%; }
.profile-security > .profile-field > .profile-input { max-width: 360px; }
.profile-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.profile-page .profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--profile-navy);
  border-radius: 8px;
  padding: 10px 18px;
  background: var(--profile-navy);
  color: white;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  text-align: center;
  white-space: normal;
  box-shadow: 0 2px 5px rgba(4, 62, 99, .08);
}
.profile-page .profile-button:hover { background: #125473; border-color: #125473; }
.profile-page .profile-button--secondary { background: white; color: var(--profile-navy); border-color: #cbd6df; box-shadow: none; }
.profile-page .profile-button--secondary:hover { background: #edf5f7; }
.profile-page :is(button, input[type=submit], summary):focus-visible { outline: 2px solid var(--profile-teal); outline-offset: 4px; }
.profile-device-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: #f3f8fa; border-radius: 10px; padding: 18px; margin-top: 20px; }
.profile-device-row > div { flex: 1; }
.profile-device-row h3 { font-size: 13px; font-weight: 650; margin: 0; }
.profile-device-row .profile-button { flex-shrink: 0; }
.profile-notice { margin: 16px 0; padding: 16px; background: #f3f8fa; border-left: 3px solid var(--profile-teal); border-radius: 4px; font-size: 13px; line-height: 1.7; }
.profile-disclosure { border-top: 1px solid #e8edf1; margin-top: 20px; }
.profile-disclosure > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; padding: 17px 0 0; min-height: 44px; font-size: 13px; font-weight: 600; color: var(--profile-navy); }
.profile-page summary::-webkit-details-marker { display: none; }
.profile-chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin: -4px 3px 0 auto; flex-shrink: 0; }
.profile-disclosure[open] > summary > .profile-chevron { transform: rotate(225deg); margin-top: 4px; }
.profile-disclosure__body { padding-top: 20px; }
.profile-notification-help > summary { color: #3b6579; font-size: 12px; }
.profile-page [data-web-push-target=instructions] { margin-top: 14px; }
.profile-page [data-platform] { border-color: var(--profile-border); border-radius: 8px; }
.profile-page [data-platform] summary { color: var(--profile-navy); font-size: 12px; min-height: 44px; }
.profile-page [data-platform] :is(ol, p) { color: var(--profile-muted); font-size: 12px; line-height: 1.75; }
.profile-list-heading { margin: 24px 0 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #526c7d; }
.profile-periods { list-style: none; margin: 0; padding: 0; }
.profile-period { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 0; border-bottom: 1px solid #e8edf1; }
.profile-period:last-child { border-bottom: 0; }
.profile-period__dates { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.7; }
.profile-period .profile-help { margin-top: 3px; }
.profile-remove { color: #647786; font-size: 12px; min-height: 44px; padding: 8px 4px; background: none; border: none; cursor: pointer; }
.profile-remove:hover { color: #ad3535; text-decoration: underline; }
.profile-count { min-width: 22px; text-align: center; font-size: 11px; padding: 1px 6px; border-radius: 5px; background: #edf2f5; color: #526c7d; }
.profile-empty { margin: 20px 0 0; padding: 18px; background: #f6f8fa; border-radius: 8px; font-size: 13px; color: var(--profile-muted); }
.profile-history { max-height: 340px; overflow-y: auto; padding-right: 6px; margin-top: 12px; }
/* iPhone/iPad setup guide (native <dialog>). Type is deliberately larger than
   the rest of the page: this is the screen a non-technical person follows
   with the phone in their hand, and it must fit that screen WITHOUT scrolling
   (checked at 390x844). Never set `display` on the dialog itself — the UA
   hides a closed dialog with display:none. */
.profile-dialog { width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--profile-border); border-radius: 16px; background: #fff; color: var(--profile-navy); box-shadow: 0 18px 50px rgba(4, 62, 99, .22); overflow-y: auto; }
.profile-dialog::backdrop { background: rgba(4, 38, 60, .55); }
.profile-dialog__body { padding: 22px 18px 14px; }
.profile-dialog h2 { margin: 0 0 6px; font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; color: var(--profile-navy); }
.profile-dialog h2:focus { outline: none; } /* programmatic focus target only */
.profile-dialog__lead { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: #456073; }
.profile-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.profile-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px; background: #f3f8fa; border-radius: 12px; }
.profile-step__num { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: var(--profile-navy); color: #fff; font-size: 16px; font-weight: 700; }
.profile-step__title { margin: 3px 0 0; font-size: 16.5px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.profile-step__hint { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: #456073; }
.profile-step__glyph { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-left: 4px; vertical-align: -8px; border: 1px solid #cbd6df; border-radius: 7px; background: #fff; color: var(--profile-navy); }
.profile-step__glyph--app { border: 0; overflow: hidden; box-shadow: 0 1px 3px rgba(4, 62, 99, .25); }
.profile-step__glyph--app img { display: block; width: 28px; height: 28px; }
.profile-dialog__actions { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.profile-page .profile-dialog__actions .profile-button { width: 100%; min-height: 48px; font-size: 16px; }
.profile-link-button { min-height: 44px; padding: 8px; border: 0; background: none; color: #3b6579; font-size: 14px; font-weight: 600; text-decoration: underline; cursor: pointer; }
@media (max-width: 640px) {
  .profile-page__heading { margin-bottom: 22px; }
  .profile-page__heading h1 { font-size: 28px; }
  .profile-card { padding: 22px 18px; border-radius: 12px; margin-bottom: 16px; }
  .profile-section-heading { flex-direction: column; gap: 12px; margin-bottom: 20px; }
  .profile-section-heading h2 { font-size: 17px; }
  .profile-fields, .profile-fields--three { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .profile-page .profile-input { font-size: 16px; }
  .profile-device-row { flex-direction: column; align-items: stretch; padding: 16px; gap: 16px; }
  .profile-device-row .profile-button { align-self: flex-start; }
  .profile-period { gap: 8px; }
  .profile-period__dates { font-size: 12px; }
}
/* "One last step" greeting for the installed app (shared/_web_push_prompt).
   Self-contained on purpose: it renders in both logged-in layouts, outside
   .profile-page, so it cannot use profile.css's scoped variables or button
   classes. Values match Profile's setup guide (navy/teal brand tokens — see
   CLAUDE.md "User-facing screen design"). Type is large: this is read by a
   non-technical person with the phone in their hand, and must fit the screen
   without scrolling. Never set `display` on the dialog itself — the UA hides
   a closed dialog with display:none. */
.push-prompt {
  --push-navy: #043e63;
  --push-teal: #589aaf;
  width: min(420px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #dde4ea;
  border-radius: 16px;
  background: #fff;
  color: var(--push-navy);
  font-family: Montserrat, ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 18px 50px rgba(4, 62, 99, .22);
  overflow-y: auto;
}
.push-prompt::backdrop { background: rgba(4, 38, 60, .55); }
.push-prompt [hidden] { display: none !important; }
.push-prompt__body { padding: 24px 20px 16px; }
.push-prompt h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; line-height: 1.25; letter-spacing: -.02em; color: var(--push-navy); }
.push-prompt h2:focus { outline: none; } /* programmatic focus target only */
.push-prompt p { margin: 0 0 10px; font-size: 16px; line-height: 1.55; color: #33536a; }
.push-prompt .push-prompt__hint { padding: 12px 14px; border-radius: 10px; background: #f3f8fa; font-size: 15px; color: #33536a; }
.push-prompt__actions { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.push-prompt__primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 10px 18px;
  border: 1px solid var(--push-navy);
  border-radius: 10px;
  background: var(--push-navy);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.push-prompt__primary:hover { background: #125473; border-color: #125473; }
.push-prompt__primary:disabled { opacity: .6; cursor: default; }
.push-prompt__link { min-height: 44px; padding: 8px; border: 0; background: none; color: #3b6579; font-size: 15px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.push-prompt :is(button, a):focus-visible { outline: 2px solid var(--push-teal); outline-offset: 3px; }
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

/* Fix nav for sticky poptin */
body:has(.poptin-popup) nav {
  top: 50px !important;
}

/* Prevent horizontal page scroll from wide tables */
#content {
  /* Use clip to avoid creating a scroll container that can break sticky/fixed descendants. */
  overflow-x: clip;
}

.header-checkin-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background-image: linear-gradient(to right, #45ADC4, #589AAF);
  box-shadow:
    0 4px 15px rgba(69, 173, 196, 0.25),
    0 0 16px rgba(69, 173, 196, 0.16);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    filter 0.3s ease,
    background-image 0.3s ease;
}

.header-checkin-cta:hover {
  transform: translateY(-2px);
  color: #fff !important;
  text-decoration: none !important;
  background-image: linear-gradient(to right, #4fbdd6, #45ADC4);
  box-shadow:
    0 6px 24px rgba(69, 173, 196, 0.40),
    0 0 22px rgba(69, 173, 196, 0.24);
  filter: brightness(1.05);
}

.header-checkin-cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.header-checkin-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .header-checkin-cta {
    gap: 0.5rem;
  }

  .header-checkin-cta__icon {
    transform: translateY(-0.5px);
  }
}

.header-faq-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  padding: 0.4rem 0.75rem;
  border-radius: 9999px;
  color: rgba(255, 255, 255, 0.75) !important;
  text-decoration: none !important;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.header-faq-cta:hover {
  transform: translateY(-1px);
  color: #fff !important;
  text-decoration: none !important;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.4);
}

.header-faq-cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}
