/* The typeface is one family — IBM Plex Sans with IBM Plex Sans Arabic — read through
   var(--font-h) for headings and var(--font-b) for body (batch 5, D13 + D24). The faces
   themselves are declared in fonts.css and served from static/fonts. */
:root {
    /* TRUE logo orange — the logo mark's fill. --orange (#BE630D) below
       is the darker text-orange for copy on light backgrounds; accents
       that claim "logo orange" (flash glow, pill hover, System avatar)
       must use THIS. */
    --logo-orange: #E26E00;
    --white: #fff;
    --black: #181818;
    /* ------------------------------------------------------------------
       NEUTRAL RAMP (G1, finding F21). One ladder instead of 12 near-identical
       greys, every step legible on BOTH surfaces the app actually uses.

       The floor is contrast against --light-background #F6F6F6, NOT white:
       the app's own pages are #F6F6F6, so a grey that passes on white and
       fails on #F6F6F6 is still unreadable where it is used. #6B7478 is the
       trap — 4.78:1 on white, 4.42:1 on #F6F6F6.

         --ink        #181818   16.1 / 14.9   headings, primary text
         --ink-2      #3F4A4C    9.4 /  8.7   body
         --gray       #6F6F6F    5.0 /  4.7   secondary text  <- AA on both
         --ink-muted  #767676    4.5 /  4.2   AA on white only: never on a
                                              tinted background. Disabled and
                                              decorative text only.
         --line       #E6E9EC                 borders
         --line-2     #F1F3F4                 hairlines
       ------------------------------------------------------------------ */
    --gray: #6F6F6F;
    --ink: #181818;
    --ink-2: #3F4A4C;
    --ink-muted: #767676;
    --line: #E6E9EC;
    --line-2: #F1F3F4;
    /* A light background: all 8 uses are chips, hovers and disabled buttons, each written with a #F5F5F5
       fallback. 22 Sep defined it as #8A8A8A (a text grey), which turned all 8 mid-grey: the bell's
       "50 unread" read at about 1.4:1 (26 Oct). */
    --gray-light1: #F5F5F5;
    /* Used once, never defined. Warning needs its own amber: orange is the
       brand accent and must not double as a warning (see the colour rule). */
    --amber-line: #B45309;
    --gray-light: #6E6E6E;
    --gray-light2: #EBEBEB;
    --orange: #BE630D;
    --orange-light: #FFF0E2;
    --red: #E90909;
    --red-light: #F6E2E2;
    --green: #04696F;
    --green-light: #C9ECEC;
    --green-light2: #358B35;
    --primary-color: #04696F;
    --secondary-color: #035459;
    --opacity-primary-color: rgba(4, 105, 111, 0.1);
    --light-background: #F6F6F6;
    --blue: #35358B;
    --blue-light: #E2E2F6;
    --border: #F3F3F3;
    --scroll-track: #E6F6F6;
    --scroll-thumb: #057B8275;
    --olive-gold: #6F6D04;
    --soft-cream: #EBECC9;
      /* ---- Batch 1, the quiet tokens (D12, 2026-09-23; built 2026-09-24) ----
       Spacing, radius, shadow and line-height, at the values the owner approved.
       Every later batch changes one number here instead of hundreds below. */
    --s-1: 2px; --s-2: 4px; --s-3: 6px; --s-4: 8px; --s-5: 10px; --s-6: 12px;
    --s-7: 14px; --s-8: 16px; --s-9: 20px; --s-10: 24px; --s-11: 32px; --s-12: 40px;
    --r-1: 4px; --r-2: 6px; --r-3: 8px; --r-4: 10px; --r-5: 12px; --r-pill: 999px;
    --sh-1: 0 1px 2px rgba(16,24,32,.06);      /* resting on the page: cards, table containers */
    --sh-2: 0 4px 12px rgba(16,24,32,.08);     /* lifted: popovers, menus, a hovered row */
    --sh-3: 0 8px 24px rgba(16,24,32,.12);     /* above everything: dialogs, drawers, toasts */
    --sh-4: 0 16px 48px rgba(16,24,32,.18);    /* over a dimmed page: the slide-over */
    --sh-focus: 0 0 0 3px rgba(4,105,111,.16); /* attention, not depth: every focus ring */
    --lh-1: 1; --lh-2: 1.25; --lh-3: 1.5; --lh-4: 1.65;
      /* ---- Batch 2, the text sizes (D12; built 2026-09-25): eight steps, a 12px floor. Nothing
       in the app is set below --t-1; the sizes that sat between steps keep their value until the typeface batch. */
    --t-1: 12px; --t-2: 13px; --t-3: 14px; --t-4: 16px; --t-5: 18px; --t-6: 20px; --t-7: 24px; --t-8: 30px;

  /* Motion (D2, approved 2026-09-21): one easing, three durations. The values
     already ship as literals across style.css; the shell (batch 3) is the first
     component to read them as tokens. --ease-spring is for celebration only. */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-state: 120ms;
  --dur-fade: 180ms;
  --dur-move: 240ms;

  /* The teal wash — a selected / hovered surface on white (the rail's current item, a
     tertiary button's hover). Moved here from shell.css so every page has it. */
  --teal-wash: #E6F1F1;

  /* The typeface tokens --font-h / --font-b (D13 + D24, batch 5) are defined in fonts.css,
     next to the faces, so every page that loads the faces has the family. */
}
  
  *,
  ::after,
  ::before {
    box-sizing: border-box;
  }
  
  html,
  body {
    margin: 0;
    padding: 0;
    font-family: var(--font-h);
  }

  /* An author `display:` rule beats the browser's own [hidden] handling, so any
     component with `display:flex` silently ignored the attribute. One reset
     line instead of patching each component. */
  [hidden] { display: none !important; }

  button {
    padding: 0;
    margin: 0;
    background-color: transparent;
    border: none;
  }
  
  ul,
  li,
  p,
  a {
    list-style: none;
    padding: 0;
    margin: 0;
    text-decoration: none;
  }
  
  .gray {
    color: var(--gray) !important;
  }
  
  .orange {
    color: var(--orange) !important;
  }
  
  .red {
    color: var(--red) !important;
  }
  
  .green {
    color: var(--green) !important;
  }
  
  .green-light {
    color: var(--green-light2) !important;
  }
  
  .blue {
    color: var(--blue) !important;
  }
  

  /* ==================================================================================
     THE ONE BUTTON — batch "buttons" (D60, 2026-09-26): the component approved with the
     style guide (D10), as it is. 36px, radius 10, Plex 600 14px; on a phone 44px.
     Kinds: .btn-primary (teal, the one action on a page) · .btn-secondary (outline) ·
     .btn-tertiary (text only) · .btn-danger (red) · .btn-danger-2 (red outline).
     Sizes: .btn-sm (30px; 36 on a phone) · .btn-icon (a square, needs aria-label).
     States: hover darkens · :active scales to 97% · focus ring · disabled (attribute,
     aria-disabled or the .disabled class) is grey, and may sit in a .tip[data-tip] that
     says why · .is-loading / .is-saving shows a spinner before the label new.js sets.
     The old names below this block are LEGACY: the parked staff portal (D57) still uses
     them; delete them with the staff batch. tests/test_one_button.py refuses them in
     every workspace template.
     ================================================================================== */
  .btn {
    font-family: var(--font-h); font-size: var(--t-3); font-weight: 600; line-height: var(--lh-1);
    text-align: center; padding: 0 18px; margin: 0; display: inline-flex; align-items: center;
    justify-content: center; gap: var(--s-4); border-radius: var(--r-4); height: 36px;
    text-decoration: none; cursor: pointer; border: 1px solid transparent; background: transparent;
    white-space: nowrap; color: var(--primary-color);
    transition: background-color var(--dur-state) var(--ease), border-color var(--dur-state) var(--ease),
                color var(--dur-state) var(--ease), transform var(--dur-state) var(--ease);
  }
  .btn:active { transform: scale(.97); }
  .btn:focus-visible { outline: none; box-shadow: var(--sh-focus); }
  .btn-primary { color: #fff; background: var(--primary-color); }
  .btn-primary:hover { background: var(--secondary-color); color: #fff; }
  .btn-secondary { color: var(--primary-color); border-color: var(--primary-color); background: #fff; }
  .btn-secondary:hover { color: var(--secondary-color); border-color: var(--secondary-color); background: #F7FBFB; }
  .btn-tertiary { color: var(--primary-color); }
  .btn-tertiary:hover { background: var(--teal-wash); }
  .btn-danger { color: #fff; background: var(--red); }
  .btn-danger:hover { background: #C40707; color: #fff; }
  .btn-danger-2 { color: var(--red); border-color: var(--red); background: #fff; }
  .btn-danger-2:hover { background: #FFF5F5; }
  .btn-sm { height: 30px; font-size: var(--t-2); padding: 0 var(--s-7); border-radius: var(--r-3); }
  .btn-icon { width: 36px; padding: 0; }
  .btn-icon.btn-sm { width: 30px; }
  .btn > svg { width: 16px; height: 16px; flex: 0 0 auto; }
  .btn.active { color: #fff; background: var(--primary-color); border-color: transparent; }   /* the current page in a pager */
  .btn[aria-disabled="true"], .btn:disabled, .btn.disabled {
    background: var(--gray-light2); color: var(--gray); border-color: transparent; cursor: not-allowed; transform: none; pointer-events: auto;
  }
  .btn.is-loading, .btn.is-saving { position: relative; pointer-events: none; opacity: 1; cursor: progress; }
  .btn.is-loading::before, .btn.is-saving::before {
    content: ''; width: 14px; height: 14px; flex: 0 0 auto; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: btn-spin .7s linear infinite;
  }
  .btn-secondary.is-loading::before, .btn-secondary.is-saving::before, .btn-tertiary.is-loading::before, .btn-tertiary.is-saving::before {
    border-color: rgba(4,105,111,.25); border-top-color: var(--primary-color);
  }
  .btn-danger-2.is-loading::before, .btn-danger-2.is-saving::before { border-color: rgba(233,9,9,.25); border-top-color: var(--red); }
  .btn-icon.is-loading > svg, .btn-icon.is-saving > svg { display: none; }              /* the spinner takes the icon's place */
  @keyframes btn-spin { to { transform: rotate(360deg); } }
  /* the note on a button you cannot use: <span class="tip" data-tip="why, and who can"><button class="btn …" aria-disabled="true">…</button></span> */
  .tip { position: relative; display: inline-flex; }
  .tip::after {
    content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
    background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: var(--sh-2); border-radius: var(--r-3);
    padding: var(--s-3) var(--s-5); font: 500 var(--t-1)/1.4 var(--font-h); white-space: nowrap; opacity: 0; pointer-events: none;
    transition: opacity var(--dur-fade) var(--ease); z-index: 60;
  }
  .tip:hover::after, .tip:focus-within::after { opacity: 1; }
  /* a button at the right of the page: the note lines up with its right edge (P0-05: centred, it ran past a
     tablet screen and the page scrolled sideways) */
  .tip.tip--end::after { inset-inline-start: auto; inset-inline-end: 0; transform: none; }
  @media (max-width: 760px) {
    .btn { height: 44px; padding: 0 var(--s-9); }
    .btn-sm { height: 36px; }
    .btn-icon { width: 44px; }
    .btn-icon.btn-sm { width: 36px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .btn { transition: none; }
    .btn:active { transform: none; }
    .btn.is-loading::before, .btn.is-saving::before { animation: none; }
  }

  /* ---- LEGACY (staff portal only, D57) — delete with the staff batch --------------- */
  .ellipse-button,
  .ellipse-button-small,
  .ellipse-button-secondary {
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Matches the 36px text-button scale chosen 2026-09-06; they were 4px
       taller than every button beside them. */
    min-height: 36px;
    min-width: 36px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background-color: var(--light-background);
    border-radius: 50%;
    transition: background-color .1s linear;
  }
  
  .ellipse-button-small {
    height: 36px;
    width: 36px;
  }
  
  .ellipse-button:hover,
  .ellipse-button-small:hover {
    background-color: var(--white);
  }
  
  .ellipse-button-small.delete {
    background-color: var(--red-light);
  }
  
  .ellipse-button-small.delete:hover {
    background-color: var(--red);
  }
  
  .ellipse-button-small.delete:hover svg path {
    stroke: var(--white);
  }
  
  .ellipse-button-secondary {
    background-color: var(--primary-color);
  }
  
  .ellipse-button-secondary:hover {
    background-color: var(--secondary-color);
  }
  
  .button,
  .secondary-button,
  .delete-button,
  .delete-secondary-button {
    /* Approved 2026-09-06: rounded 10px, Poppins 600, 36px tall.
       Was 100px capsule / Source Sans 400 / 16px / 40px — a hero-CTA size on
       every button in the app, which is most of why they read as oversized.
       Linear, Jira, Notion and GitHub default to 32px; Stripe to 36px.
       line-height:1 with zero vertical padding and align-items:center is what
       puts the label on the optical centre — the old 20.8px line-height inside
       a fixed 40px box sat it slightly high. */
    font-family: var(--font-h);
    font-size: var(--t-3);
    font-weight: 600;
    line-height: var(--lh-1);
    text-align: center;
    padding: 0 18px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--s-4);
    border-radius: var(--r-4);
    height: 36px;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background-color: transparent;
    transition: background-color .1s linear, border-color .1s linear, color .1s linear;
    white-space: nowrap;
  }
  
  .edit-table.button {
    width: 80px;
    padding: 0 var(--s-8);
    height: 32px;
    font-size: var(--t-2);
  }

  /* A real scale: 36 default, 30 for inline/table actions. `.small` used to be
     36px, i.e. the same as the old default, so it was small in name only. */
  .small.button,
  .small.secondary-button,
  .small.delete-button,
  .small.delete-secondary-button {
    height: 30px;
    font-size: var(--t-2);
    padding: 0 var(--s-7);
    border-radius: var(--r-3);
  }
  
  .button {
    color: var(--white);
    background-color: var(--primary-color);
  }
  
  .button:hover {
    background-color: var(--secondary-color);
  }
  
  .secondary-button {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    background-color: var(--white);
  }
  
  .secondary-button:hover {
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
  }
  
  .delete-button {
    color: var(--white);
    background-color: var(--red);
  }
  
  .button.disabled,
  .secondary-button.disabled,
  .delete-button.disabled {
    background-color: var(--gray);
    color: var(--white);
    pointer-events: none;
  }

  /* A button with the `disabled` ATTRIBUTE looked clickable: only the class
     above was styled. Dimmed with a not-allowed cursor, and no hover colour,
     but still hoverable so its title can say why (disable + tooltip).
     :where() keeps this at the lowest specificity, so every component that
     styles its own disabled state (.vm-foot, .pol-foot, .ho-strip, …) still
     wins, and a save in flight (.is-saving, .is-loading) keeps its own look. */
  :where(.button, .secondary-button, .delete-button, .delete-secondary-button):disabled:not(.is-saving, .is-loading) {
    opacity: .45;
    cursor: not-allowed;
  }
  :where(.button):disabled:not(.is-saving, .is-loading):hover { background-color: var(--primary-color); }
  :where(.secondary-button):disabled:not(.is-saving, .is-loading):hover { color: var(--primary-color); border-color: var(--primary-color); }

  .delete-secondary-button {
    background-color: var(--white);
    color: var(--red);
    border: 1px solid var(--red);
  }

  /* The .loading overlay and its loader.gif ring lived here. Every pop-up draws its own skeleton
     while its content loads (new.js), and nothing else used the class; the sweep of 2026-10-06
     removed both and the 154 KB GIF. */

/* The language switch on signed-out pages (Q146 PR 2): a quiet pill at the top end of the page. */
.lang-quiet {
  position: absolute; top: var(--s-7); inset-inline-end: var(--s-8); z-index: 20; height: 32px; padding: 0 var(--s-6);
  border: 1px solid var(--line, #E6E9EC); border-radius: var(--r-pill); background: #fff; color: var(--ink, #181818);
  font: 500 13px/1 var(--font-h); cursor: pointer;
}
.lang-quiet:hover { border-color: var(--primary-color); color: var(--primary-color); }
.lang-quiet:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
