/* The new design (TENDER_UI3, plan ui3-plan-2026-11-27): tokens, base and
   the frame. Loaded on every page while the switch is on, old bodies
   included, so every frame class is prefixed u3- and never meets style.css.
   The values are the approved mockup's (2026-11-27-new-design); the token
   names carry a --u- prefix for the same reason.

   The desk of a lawyer marking a draft: office-white paper, blue-black ink,
   a ballpoint blue for actions and selection only, and highlighters for
   anything that has a state: yellow waits for the lawyer (and marks a blank),
   green is done, pink blocks, light blue is the brain at work.

   Three planes (the richer look, 2026-11-30): the navy rail at the back, the
   desk (--u-desk, a cool light grey) in the middle, and white sheets of paper
   on top: cards, the start box, the message box, the panel "דף המכרז". A sheet
   is told from the desk by its shadow, not by a darker line. Each highlighter
   keeps one meaning and is used with confidence: a card that waits for the
   lawyer carries yellow, a plan carries the pen's blue, a delivery green.

   Logical properties only. The two drawers slide with translateX, which is
   physical: the document is always right to left, so the rail leaves to the
   right (+100%) and the panel to the left (-100%). */

@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("heebo-hebrew-wght-normal.woff2") format("woff2");
  unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}
@font-face {
  font-family: "Heebo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("heebo-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- tokens ----
   Every colour pair used for text clears WCAG AA (4.5:1); the numbers are in
   the night's report (richer-look-report-2026-11-30.md). */
:root {
  /* the desk under the sheets, and its deeper tone (the lawyer's own note, a pressed control) */
  --u-desk: #ECEFF4; --u-desk-2: #DFE5EF;
  --u-paper: #FBFCFE; --u-paper-2: #F2F4F8; --u-paper-3: #E8ECF3; --u-white: #fff;
  /* line-3: a control's edge under the pointer, one step darker than its resting line-2;
     line-field: a text field's edge, 3.3:1 on white (WCAG 1.4.11), the value today's look uses */
  --u-line: #DDE1EA; --u-line-2: #C5CBD8; --u-line-3: #A9B2C3; --u-line-field: #848FA1;
  --u-ink: #141B2D; --u-ink-2: #434C61; --u-ink-3: #5F6982;
  /* rail-0: the rail's lower end, so the navy has a little light falling from the top */
  --u-rail-0: #13233F; --u-rail: #182B4D; --u-rail-2: #213760; --u-rail-3: #2C4578; --u-rail-line: #2B4170;
  --u-rail-ink: #EEF2FA; --u-rail-ink-2: #AEBBD8;
  /* the pen: pen-3 is the pressed ink, tint-2 the tint under the pointer */
  --u-pen: #2648D8; --u-pen-2: #1D39B2; --u-pen-3: #172E93; --u-pen-tint: #E9EEFE; --u-pen-tint-2: #D9E1FD;
  /* each highlighter: the stroke, a tint for a whole surface (a card's head), its edge */
  --u-hl: #FFE25A; --u-hl-soft: #FFF3B0; --u-hl-tint: #FFF8DB; --u-hl-line: #EED47A;
  --u-ok: #BDEFC6; --u-ok-ink: #11592A; --u-ok-tint: #EAF7EE; --u-ok-line: #A7DDB4;
  --u-stop: #FFC7D1; --u-stop-ink: #8E1230; --u-stop-tint: #FFF0F3;
  --u-busy: #CFE2FF; --u-busy-ink: #173B8A; --u-busy-tint: #EDF3FF;
  --u-r-s: 8px; --u-r: 12px; --u-r-l: 16px;
  /* Depth: sh-1 a sheet resting on the desk, sh-lift a sheet raised (the start
     box, the message box, a card under the pointer), sh-2 what floats over the
     page (a drawer, a dialog). sh-key is a secondary button's bottom edge,
     sh-pen the primary button's own blue shadow. Every shadow has an offset
     and a soft blur, and none is heavy: they never sit on a scrolled list. */
  --u-sh-1: 0 1px 2px rgba(20, 27, 45, .05), 0 2px 5px -1px rgba(20, 27, 45, .07), 0 10px 24px -14px rgba(20, 27, 45, .2);
  --u-sh-lift: 0 1px 2px rgba(20, 27, 45, .06), 0 6px 14px -6px rgba(20, 27, 45, .14), 0 22px 44px -22px rgba(20, 27, 45, .32);
  --u-sh-2: 0 10px 30px rgba(20, 27, 45, .18), 0 2px 6px rgba(20, 27, 45, .08);
  --u-sh-key: 0 1px 1px rgba(20, 27, 45, .07), 0 1px 3px -1px rgba(20, 27, 45, .08);
  --u-sh-pen: inset 0 1px 0 rgba(255, 255, 255, .16), 0 1px 2px rgba(23, 46, 147, .35), 0 4px 10px -3px rgba(38, 72, 216, .45);
  /* motion: a strong ease-out for anything that answers the user, and two lengths */
  --u-ease: cubic-bezier(.16, 1, .3, 1);
  --u-t-1: .12s; --u-t-2: .2s;
  /* type: body sizes (xs to b), then three steps with presence: h a section
     heading, l a conversation's title and a dialog's, xl a page's title.
     Sized for the lawyers' screens, which show pages at 150% (the size pass,
     2026-11-30): reading text 15-16 px, which is 22-24 px on such a screen;
     the steps above it close enough that a sheet is not crowded by its title. */
  --u-fs-xs: .8125rem; --u-fs-s: .875rem; --u-fs-m: .9375rem; --u-fs-b: 1rem;
  --u-fs-h: 1.125rem; --u-fs-l: 1.25rem; --u-fs-xl: 1.625rem;
  /* control heights: a button or a choice (ctl), a small button or chip
     (ctl-s), a one-line text field (ctl-field). At 150% the smallest is 45
     device px, well above a finger's target (WCAG 2.5.8, 24 px). */
  --u-ctl: 36px; --u-ctl-s: 30px; --u-ctl-field: 38px;
  --u-font: "Heebo", "Segoe UI", "Arial Hebrew", Arial, sans-serif;
  --u-rail-w: 276px;
}

/* ---- base ---- */
html { font-size: 16px; }
body.u3 {
  margin: 0; font-family: var(--u-font); color: var(--u-ink); background: var(--u-desk);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
.u3 *, .u3 *::before, .u3 *::after { box-sizing: border-box; }
.u3 * { scrollbar-width: thin; scrollbar-color: var(--u-line-2) transparent; }
.u3 [hidden] { display: none !important; }
.u3 ::selection { background: var(--u-hl); color: var(--u-ink); }
.u3 :focus-visible { outline: 2px solid var(--u-pen); outline-offset: 2px; }
.u3-rail :focus-visible, .u3-topbar :focus-visible { outline-color: var(--u-hl); }
.u3 textarea, .u3 input { caret-color: var(--u-pen); }
/* A text box with dir="auto" rests right to left while it is empty: an empty
   auto box takes no direction and would put its Hebrew placeholder on the left
   (the UI2 report). Once something is typed, the text decides. */
.u3 input[dir="auto"]:placeholder-shown, .u3 textarea[dir="auto"]:placeholder-shown { direction: rtl; }
.u3-num { font-variant-numeric: tabular-nums; }
.u3-i {
  width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.u3-flip:dir(rtl) { transform: scaleX(-1); }
.u3-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.u3-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
/* The first stop of the keyboard: hidden until focused, then a yellow tab at
   the top of the work side. */
.u3-skip {
  position: fixed; inset-block-start: 8px; inset-inline-start: calc(var(--u-rail-w) + 12px); z-index: 90;
  padding: 8px 14px; border-radius: 8px; background: var(--u-hl); color: var(--u-ink); font-weight: 600;
  text-decoration: none; transform: translateY(-160%); transition: transform .15s var(--u-ease);
}
.u3-skip:focus { transform: none; text-decoration: none; }
.u3-work:focus { outline: none; }
@media (max-width: 900px) { .u3-skip { inset-inline-start: 12px; } }

/* ---- the frame: the rail on the right, the work area beside it ----
   Ordinary pages scroll the document (old bodies, anchors, sticky headers
   and the browser's own scroll restore rely on it); the rail stays in view.
   A page that sets ui3_fixed (the conversation) locks the frame to the
   screen and scrolls inside. */
.u3-app { display: grid; grid-template-columns: var(--u-rail-w) minmax(0, 1fr); min-height: 100dvh; }
.u3-work { min-width: 0; }
body.u3-fixed { overflow: hidden; }
.u3-fixed .u3-app { height: 100dvh; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.u3-fixed .u3-work { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); }
.u3-topbar { display: none; }

/* The rail is the back plane: navy with a little light from the top (rail to
   rail-0), so it reads as a surface, not a flat fill. */
.u3-rail {
  position: sticky; inset-block-start: 0; height: 100dvh;
  display: flex; flex-direction: column; min-height: 0; padding: 14px 12px 10px;
  background: var(--u-rail) linear-gradient(to bottom, var(--u-rail) 30%, var(--u-rail-0)); color: var(--u-rail-ink);
}
.u3-rail * { scrollbar-color: var(--u-rail-3) transparent; }
.u3-rail a { color: inherit; text-decoration: none; }
.u3-rail a:hover { text-decoration: none; }
.u3-rail-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 14px; }
.u3-rail .u3-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; font-size: var(--u-fs-b); }
.u3-rail .u3-brand svg { flex: none; }

.u3-icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.u3-rail-x { display: none; color: var(--u-rail-ink-2); }
.u3-rail-x:hover, .u3-topbar .u3-icon-btn:hover { background: var(--u-rail-2); color: #fff; }
.u3-icon-btn:active { transform: translateY(1px); }

/* "מכרז חדש": a sheet of paper on the rail, the one white thing there, with
   the pen's plus; it presses in under the finger. */
.u3-rail .u3-new {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px;
  border-radius: var(--u-r-s); background: var(--u-white); color: var(--u-ink); font-weight: 600;
  box-shadow: inset 0 -1px 0 rgba(20, 27, 45, .08), 0 2px 6px rgba(0, 0, 0, .28);
  transition: background-color var(--u-t-1), transform var(--u-t-1) var(--u-ease);
}
.u3-rail .u3-new .u3-i { color: var(--u-pen); stroke-width: 2.2; }
.u3-rail .u3-new:hover { background: var(--u-pen-tint); }
.u3-rail .u3-new:active { transform: scale(.98); }

/* The current place is marked the way a lawyer marks a page: the item lifts
   to the lighter navy and its icon takes the highlighter. */
.u3-nav { display: grid; gap: 2px; margin-top: 14px; }
.u3-nav a, .u3-rail-foot a:not(.u3-out) {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--u-r-s);
  color: var(--u-rail-ink-2); font-size: var(--u-fs-m); transition: background-color .15s, color .15s;
}
.u3-nav a:hover, .u3-rail-foot a:not(.u3-out):hover { background: var(--u-rail-2); color: #fff; }
.u3-nav a[aria-current], .u3-rail-foot a[aria-current] {
  background: var(--u-rail-3); color: #fff; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.u3-nav a[aria-current] .u3-i, .u3-rail-foot a[aria-current] .u3-i { color: var(--u-hl); }

/* The search box is sunk into the rail (an inner shadow), unlike the raised
   "מכרז חדש" above it. */
.u3-rail-search {
  display: flex; align-items: center; gap: 8px; margin: 14px 0 2px; padding: 0 10px; height: 36px;
  border-radius: var(--u-r-s); background: var(--u-rail-2); color: var(--u-rail-ink-2);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .22); transition: box-shadow .15s, background-color .15s;
}
.u3-rail-search:hover { background: var(--u-rail-3); }
.u3-rail-search input {
  flex: 1; min-width: 0; height: 100%; min-height: 0; padding: 0; margin: 0;
  border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: var(--u-fs-s);
}
.u3-rail-search input:focus { outline: 0; border: 0; }
.u3-rail-search input::placeholder { color: var(--u-rail-ink-2); }
.u3-rail-search:focus-within { box-shadow: 0 0 0 2px var(--u-hl); }

/* Both ends of the scrolling list fade out, so a cut under the search box or
   above the foot never shows as a line sliced in half; the padding lets the
   first and last conversations rest clear of the fades, and scroll-padding
   keeps the current one clear when it is scrolled into view. */
.u3-rail-list {
  flex: 1; min-height: 0; overflow: auto; margin-inline: -4px; padding-inline: 4px; padding-block: 4px 28px;
  scroll-padding-block: 20px 32px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
}
.u3-rail-g {
  display: flex; justify-content: space-between; align-items: center; margin: 16px 0 4px; padding-inline: 10px;
  font-size: .75rem; line-height: 1.5; font-weight: 600; letter-spacing: .03em; color: var(--u-rail-ink-2);
}
.u3-count {
  padding: .05em .45em; border-radius: 3px; background: var(--u-hl); color: var(--u-ink);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.u3-rail-sec ul { list-style: none; margin: 0; padding: 0; }
.u3-rail-i {
  display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: baseline;
  padding: 8px 10px; border-radius: var(--u-r-s); color: var(--u-rail-ink); transition: background-color .15s;
}
.u3-rail-i:hover { background: var(--u-rail-2); }
.u3-rail-i[aria-current] { background: var(--u-rail-3); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.u3-rail-i b { font-weight: 500; font-size: var(--u-fs-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u3-rail-i[aria-current] b { font-weight: 600; color: #fff; }
.u3-rail-i small { grid-column: 2; font-size: var(--u-fs-xs); color: var(--u-rail-ink-2); }
.u3-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--u-rail-ink-2); }
.u3-tone-wait .u3-dot { background: var(--u-hl); border-radius: 2px; }
.u3-tone-wait small { color: var(--u-hl); }
/* A conversation the brain is working on breathes: a ring leaves its dot,
   every 1.8 s (transform and opacity only). */
.u3-tone-work .u3-dot { background: #8DB8FF; }
.u3-tone-work .u3-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: #8DB8FF;
  animation: u3-ping 1.8s var(--u-ease) infinite;
}
@keyframes u3-ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.6); opacity: 0; } }
.u3-tone-ready .u3-dot { background: #74DA90; }
.u3-tone-stop .u3-dot { background: var(--u-stop); border-radius: 2px; }
.u3-tone-stop small { color: var(--u-stop); }
.u3-rail-none { margin: 14px 10px; font-size: var(--u-fs-s); color: var(--u-rail-ink-2); }

.u3-rail-foot { display: grid; gap: 2px; padding-top: 8px; border-top: 1px solid var(--u-rail-line); }
.u3-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px; font-size: var(--u-fs-m); }
.u3-who-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u3-avatar {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--u-rail-3); font-size: var(--u-fs-xs); font-weight: 600;
}
.u3-rail .u3-out { margin-inline-start: auto; width: 30px; height: 30px; color: var(--u-rail-ink-2); }
.u3-rail .u3-out:hover { background: var(--u-rail-2); color: #fff; }

/* ---- the library's head over today's corpus, letterhead and skeleton pages ----
   A page title with presence (the same step as the home's), and the three
   shelves as a segmented control sunk into the desk: the open one is a sheet. */
.u3-lib-head { margin: 0 0 24px; padding-bottom: 18px; border-bottom: 1px solid var(--u-line-2); }
.u3-lib-title { margin: 0 0 6px; font-size: var(--u-fs-xl); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; color: var(--u-ink); }
.u3-lib-sub { margin: 0 0 14px; color: var(--u-ink-2); font-size: var(--u-fs-b); line-height: 1.6; max-width: 62ch; }
.u3-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 11px; background: var(--u-desk-2);
  box-shadow: inset 0 1px 2px rgba(20, 27, 45, .08);
}
.u3-tabs a {
  display: inline-flex; align-items: center; min-height: var(--u-ctl); padding: 0 14px; border-radius: var(--u-r-s);
  font-size: var(--u-fs-m); color: var(--u-ink-2); text-decoration: none; transition: background-color .15s, color .15s;
}
.u3-tabs a:hover { color: var(--u-ink); background: rgba(255, 255, 255, .5); text-decoration: none; }
.u3-tabs a[aria-current="page"] { background: var(--u-white); color: var(--u-ink); font-weight: 600; box-shadow: var(--u-sh-key); }

.u3-scrim {
  position: fixed; inset: 0; z-index: 40; background: rgba(20, 27, 45, .42);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s;
}
.u3-scrim.u3-on { opacity: 1; visibility: visible; transition: opacity .2s; }

/* ---- narrower screens: under 900 px the rail becomes a drawer ---- */
@media (max-width: 900px) {
  .u3-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .u3-topbar {
    display: flex; align-items: center; gap: 6px; padding: 8px 10px;
    position: sticky; inset-block-start: 0; z-index: 30; background: var(--u-rail); color: #fff;
  }
  .u3-topbar strong { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .u3-fixed .u3-topbar { position: static; }
  .u3-fixed .u3-app { grid-template-rows: auto minmax(0, 1fr); }
  .u3-rail {
    position: fixed; inset-block: 0; inset-inline-start: 0; width: min(86vw, 300px); height: auto; z-index: 50;
    transform: translateX(100%); visibility: hidden; transition: transform .22s var(--u-ease), visibility 0s .22s;
  }
  .u3-rail.u3-open { transform: none; visibility: visible; transition: transform .22s var(--u-ease); }
  .u3-rail-x { display: grid; }
}

/* ---- the feedback helper (מיכי) inside the new design ----
   feedback.css draws the helper for both looks and reads its colours from its
   own --fbk- variables. Inside the new design they are tied to this sheet's
   tokens, so the helper follows the design if a token changes; feedback.css
   itself is not touched, and today's look never sees these rules. */
body.u3 .fbk-launcher, body.u3 .fbk-panel {
  --fbk-navy: var(--u-rail); --fbk-navy-2: var(--u-rail-2); --fbk-hl: var(--u-hl); --fbk-hl-soft: var(--u-hl-soft);
  --fbk-pen: var(--u-pen); --fbk-pen-tint: var(--u-pen-tint); --fbk-ink: var(--u-ink); --fbk-ink-3: var(--u-ink-3);
  --fbk-line: var(--u-line); --fbk-line-2: var(--u-line-2); --fbk-paper-2: var(--u-paper-2); --fbk-sh: var(--u-sh-2);
  --fbk-ease: var(--u-ease);
}
body.u3 .fbk-panel { border-radius: var(--u-r-l); }
/* The helper's hidden line for screen readers (feedback.js puts it at the end
   of <body>): with no offset it sat under the frame, which is exactly one
   screen high, and the page scrolled by 1 px, which brought a scrollbar. */
body.u3 > .fbk-sr { inset-block-start: 0; }

/* Reduced motion: transitions and animations end at once. An endless
   animation (the brain's pulse, the working sweep) also runs once, or at that
   speed it would flicker instead of stopping. */
@media (prefers-reduced-motion: reduce) {
  .u3 *, .u3 *::before, .u3 *::after {
    animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
