/* The Deeplica house look (the owner, 12 November: "the same style as DeepFleet and SGroup").
   Loaded last of the kit's stylesheets (the name sorts after every other), so it sets the look and nothing else:
   no rule here hides, moves or adds a control. The palette and the type are DeepFleet's (platform/packages/ui tokens:
   navy ground, cobalt accent, a light theme beside the dark one) and SGroup's (Chakra Petch over IBM Plex Sans Hebrew,
   Martian Mono for codes, the 24-pixel grid, the corner brackets on the figures).
   Dark is the default. A person can switch to light on the top bar (static/ui/theme.js); the choice is kept in this
   browser as `iql.theme` and set on <html data-theme> before the page paints (static/theme-boot.js). */

/* ---------- tokens: dark (default) ---------- */
:root, :root[data-theme="dark"] {
  --bg: #0b1220; --surface: #111a2c; --surface-2: #17223a; --line: #24314d; --line-strong: #3d4d6e;
  --ink: #e6ecf5; --ink-2: #c3cede; --ink-3: #9aa9c2;
  --accent: #5b9dff; --accent-ink: #050a1a; --accent-soft: #15284a; --accent-line: #2b4a80;
  --ok: #3ccf8e; --ok-soft: #0f2a22; --warn: #f5b544; --warn-soft: #2c2410; --bad: #ff6b7a; --bad-soft: #2e1219;
  --info: #8daeff; --info-soft: #13213d; --neutral-soft: #17223a; --wait: #b7a9f5; --wait-soft: #221d3f;
  --grid: #131c30; --hover: #1b2843; --card: var(--surface); --muted: var(--ink-3);
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 0 rgba(0, 0, 0, .25);
  --float: 0 14px 44px rgba(0, 0, 0, .45);
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
  --font: "Chakra Petch", "IBM Plex Sans Hebrew", "Segoe UI", "Noto Sans Hebrew", Arial, system-ui, sans-serif;
  --font-code: "Martian Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}
/* ---------- tokens: light (DeepFleet's light theme) ---------- */
:root[data-theme="light"] {
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f1f4f9; --line: #e1e6ef; --line-strong: #c3ccdb;
  --ink: #0f1a2e; --ink-2: #33425e; --ink-3: #4f5f7a;
  --accent: #1d63d8; --accent-ink: #ffffff; --accent-soft: #e7effd; --accent-line: #b7cbf2;
  --ok: #0b7a45; --ok-soft: #e4f4ec; --warn: #9a5b00; --warn-soft: #fdf1dd; --bad: #c42b3c; --bad-soft: #fcebed;
  --info: #1d4fa8; --info-soft: #e8effb; --neutral-soft: #edf0f5; --wait: #5b4bb0; --wait-soft: #efecfb;
  --grid: #e8ecf3; --hover: #e9eef6;
  --shadow: 0 1px 2px rgba(15, 26, 46, .05), 0 4px 16px rgba(15, 26, 46, .05);
  --float: 0 14px 44px rgba(15, 26, 46, .18);
  color-scheme: light;
}

/* ---------- ground and type ---------- */
html { background: var(--bg); }
body {
  font-family: var(--font); font-feature-settings: "tnum" 1;
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px; background-attachment: fixed;
}
h1, h2, h3, .qask, .tile-n, .big, .brand { font-family: var(--font); }
h1 { font-size: 26px; font-weight: 700; letter-spacing: 0; }
h2 { font-weight: 700; }
a { color: var(--accent); text-underline-offset: 3px; }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---------- top bar: DeepFleet's bar, the current screen underlined in the accent ---------- */
.topbar { background: color-mix(in srgb, var(--surface) 94%, transparent); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.2) blur(8px); -webkit-backdrop-filter: saturate(1.2) blur(8px); }
.brand { gap: 12px; letter-spacing: .01em; }
.brand-mark { border-radius: 0; background: var(--accent); color: var(--accent-ink); font-family: var(--font-code); font-size: 11px;
  font-weight: 500; letter-spacing: .06em; clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px); }
.nav a, .nav-group-btn { border-radius: 0; color: var(--ink-3); border-bottom: 2px solid transparent; padding-block: 8px 6px; }
.nav a:hover, .nav-group-btn:hover, .nav-group.open .nav-group-btn { background: var(--hover); color: var(--ink); }
.nav a[aria-current="page"], .nav-group-btn.has-current { background: transparent; color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.nav-menu { background: var(--surface); border-color: var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--float); }
.nav-menu a { border-bottom: 0; border-inline-start: 2px solid transparent; }
.nav-menu a[aria-current="page"] { border-inline-start-color: var(--accent); background: var(--accent-soft); }
.nav-count { font-family: var(--font-code); }
.user-btn { border-color: var(--line-strong); }
.avatar { background: var(--accent-soft); color: var(--accent); }
.menu { background: var(--surface); border-color: var(--line-strong); box-shadow: var(--float); }
@media (max-width: 760px) {
  .nav a, .nav-group-btn { border-bottom: 0; border-inline-start: 2px solid transparent; }
  .nav a[aria-current="page"] { border-inline-start-color: var(--accent); background: var(--accent-soft); }
}
.demo-strip { background: var(--warn-soft); border-bottom: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--ink); }

/* ---------- panels ---------- */
.card, .tile, .savebar, .drive-reqs, .handoff, .margin-card, .st-frame { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.card-h h2, .section-head h2, .card > h2:first-child { font-size: 17px; }
.section + .section { border-top-color: var(--line); }

/* the figures: SGroup's panel corners in the accent, the number large */
.tile { position: relative; border-radius: 4px; padding: 18px 20px 16px;
  background-image:
    linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)), linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-size: 12px 2px, 2px 12px, 12px 2px, 2px 12px;
  background-position: top 0 right 0, top 0 right 0, bottom 0 left 0, bottom 0 left 0; }
.tile-n { font-size: 34px; font-weight: 600; letter-spacing: .01em; color: var(--ink); }
.tile-l { color: var(--ink-3); font-size: 13px; }
.tile.warn { background-color: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.tile.warn { background-image:
    linear-gradient(var(--warn), var(--warn)), linear-gradient(var(--warn), var(--warn)),
    linear-gradient(var(--warn), var(--warn)), linear-gradient(var(--warn), var(--warn)); }

/* ---------- buttons: the primary is the accent, the rest are outlines ---------- */
.btn { border-radius: 6px; letter-spacing: .01em; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--hover); border-color: var(--ink-3); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-danger { background: transparent; }
.btn-danger:hover { background: var(--bad-soft); }

/* ---------- fields ---------- */
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=url], input[type=date], input[type=search],
input[type=password], input:not([type]), select, textarea {
  background: color-mix(in srgb, var(--bg) 55%, var(--surface)); border-color: var(--line-strong); color: var(--ink); border-radius: 6px; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink-3) 80%, transparent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--ink-3); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.field label, .label { color: var(--ink-2); }
.seg { background: color-mix(in srgb, var(--bg) 55%, var(--surface)); border: 1px solid var(--line); }
.seg button { color: var(--ink-3); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-line); }
.comp { background: var(--surface); border-color: var(--line-strong); }
.comp:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- the quote's steps ---------- */
.step { background: var(--surface); border-color: var(--line); border-radius: 6px; }
.step .num { font-family: var(--font-code); font-size: 11px; font-weight: 500; border-radius: 0;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px); }
.step[aria-current="step"] { border-color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); background: var(--accent-soft); }

/* ---------- tables: small muted heads, quiet rules, the row under the pointer lit ---------- */
table.data th, .st-framed thead th, .rt-frame thead th { color: var(--ink-3); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.st-framed thead th, .lf-scroll.lf-scrolls thead th { background: var(--surface-2); box-shadow: inset 0 -1px 0 var(--line-strong); }
.rt-frame thead th { background: var(--surface-2); }
table.data td { border-bottom-color: color-mix(in srgb, var(--line) 70%, transparent); }
table.data tr:hover td, table.st-table tbody tr:hover td { background: var(--hover); }
table.st-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.st-frame, .rt-frame, .lf-scroll.lf-scrolls { border-color: var(--line); }

/* ---------- small marks ---------- */
.chip { font-family: var(--font-code); font-size: 10.5px; letter-spacing: .04em; border-radius: 2px; background: transparent; border-color: var(--line-strong); }
.pill { border-radius: 4px; letter-spacing: .01em; }
.tabs { border-bottom-color: var(--line); }
.tabs button { color: var(--ink-3); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.progress { background: var(--surface-2); border-radius: 0; }
.progress > i { border-radius: 0; background: var(--accent); }
.spinner { border-color: var(--line-strong); border-top-color: var(--accent); }

/* ---------- overlays ---------- */
dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--float); }
dialog::backdrop { background: rgba(5, 10, 20, .6); }
.popover, .fh-pop { background: var(--surface); border-color: var(--line-strong); box-shadow: var(--float); }
.tour { background: var(--surface); border-color: var(--accent-line); box-shadow: var(--float); }
.toast { background: var(--ink); color: var(--bg); box-shadow: var(--float); }
.toast.bad { background: var(--bad); color: #14030a; }
:root[data-theme="light"] .toast.bad { color: #ffffff; }

/* ---------- the theme switch on the top bar ---------- */
.theme-btn { flex: 0 0 auto; min-width: 32px; padding-inline: 8px; }
.theme-btn .theme-ico { font-size: 15px; line-height: 1; }

@media print {
  body { background: #fff; background-image: none; color: #000; }
  .tile { background-image: none; }
}

/* ReQuest's brand row stands on the page, outside its white workspace (static/ui/mira.css): on the dark ground its navy
   words need the light ink whatever the system's theme says (mira.css only lightened them for a dark system). */
:root:not([data-theme="light"]) .rq-head .rq-name, :root:not([data-theme="light"]) .rq-head .rq-client { color: #e7ecf8; }
:root:not([data-theme="light"]) .rq-head .rq-by, :root:not([data-theme="light"]) .rq-head .rq-cap { color: #a9b4cc; }
:root[data-theme="light"] .rq-head .rq-name, :root[data-theme="light"] .rq-head .rq-client { color: var(--rq-navy); }
:root[data-theme="light"] .rq-head .rq-by, :root[data-theme="light"] .rq-head .rq-cap { color: var(--rq-muted); }
body { min-height: 100vh; }

/* a field's help bubble never stands between a person and a button (the gate of 219f771: the mobile field's help covered
   the lecturer dialog's Save) — its words let the click through; its own links and buttons stay pressable */
/* only the bubble that floats beside a field, over a dialog; the docked panel stays a pane a person points into */
body:has(dialog[open]) .fh-pop:not(.fh-docked) { pointer-events: none; }
body:has(dialog[open]) .fh-pop:not(.fh-docked) :is(a, button, summary, input, [tabindex]) { pointer-events: auto; }

/* the top bar's one settings menu (ui/zz-prefs-menu.js): theme, language, help */
.prefs { position: relative; }
.prefs-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px; display: grid; gap: 6px; padding: 10px; }
.prefs-menu.hidden { display: none; }
.prefs-row { display: flex; align-items: center; }
.prefs-row > .btn { width: 100%; justify-content: flex-start; gap: 6px; }
.prefs-menu .theme-txt.sr-only { position: static; width: auto; height: auto; clip: auto; margin: 0; overflow: visible; white-space: nowrap; }

/* an empty screen's one next step (UX walk item 6) */
.empty-next { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; grid-column: 1 / -1; }

/* the UX walk of 13 November, item 3: the quote form shares the width with the assistant and the side column — with the
   assistant open beside the page, the side column narrows and the form keeps the room */
@media (min-width: 1440px) {
  body.assist-open:not(.assist-none) .split { grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; }
}

/* the UX walk of 13 November, item 7: ReQuest's workspace is light on purpose (its own brand, static/ui/mira.css); on the
   dark ground it stands in a navy frame, as one deliberate inset, not a stray white card */
:root:not([data-theme="light"]) .rq-work { border: 2px solid #22345f; box-shadow: 0 0 0 6px rgba(9, 16, 34, .55), var(--rq-shadow); }
/* item 8: the footer stays at the bottom of the content, never floating mid-page on a short screen */
main#main { min-height: calc(100vh - 190px); }      /* the top bar, the strip and the footer's own height */

/* a blocker and the ways to solve it (app.js · solutions) — the recommended way first */
.checklist li[data-block] { align-items: flex-start; }
.block-body { display: grid; gap: 6px; }
.sol-row { display: flex; flex-wrap: wrap; gap: 6px; }
.sol-rec { font-size: 11px; font-weight: 700; padding: 0 6px; border: 1px solid currentColor; border-radius: 999px; margin-inline-start: 4px; }

/* a facilitator's box: the person's details clearly at the top (the owner, 15 November) */
.pp-box-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 15px; padding: 6px 10px; margin: -4px -4px 8px;
  border-bottom: 1px solid var(--line, #d9dde3); background: var(--panel-2, rgba(0,0,0,.03)); border-radius: 8px 8px 0 0; }
.pp-box-title .pp-box-no { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.pp-box-title [data-fac-file] { margin-inline-start: auto; }
.pp-inote { margin-top: 4px; padding: 3px 8px; border-inline-start: 3px solid #c58a00; background: rgba(197,138,0,.08); border-radius: 4px; }
.pp-links, .pp-extras { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.pp-extras ul { margin: 0; padding-inline-start: 18px; }
/* a person's own travel and expenses (ui/travel.js · personEditor): in Israel, and abroad nested under the abroad tick */
.pp-travel-box { margin: 8px 0; }
.pp-exp-part { margin-top: 6px; }
.pp-exp-h { font-weight: 600; margin-bottom: 4px; }
.pp-exp-abroad { margin-inline-start: 18px; padding-inline-start: 10px; border-inline-start: 2px solid var(--line, #d0d5dd); }
.pf-dialog { max-width: min(980px, 96vw); }
.pf-dialog h3 { margin: 10px 0 4px; font-size: 15px; }
.pf-dialog table input[type=text] { width: 100%; }

/* IQL's internal costs for the client — one frame (the owner, 15 November) */
.iql-internal { border: 2px solid var(--line-strong, #9aa4b2); border-radius: 12px; padding: 0; overflow: hidden; }
.iql-internal-head { padding: 10px 14px; background: var(--surface-2, rgba(0,0,0,.035)); border-bottom: 1px solid var(--line, #d9dde3); }
.iql-internal-head h2 { margin: 0 0 4px; }
.iql-internal > .iql-sub { margin: 10px 14px; border: 1px solid var(--line, #d9dde3); border-radius: 10px; }
.iql-internal > .iql-sub h3 { margin: 0 0 6px; font-size: 15px; }
.cf-quote { display: grid; gap: 6px; margin-top: 6px; justify-items: start; }
.cf-card { display: flex; flex-wrap: wrap; gap: 4px 10px; }
/* the client file's fixed charges: a name that reads whole, an amount beside its ₪, a "per" that shows its word */
#cfCharges { width: 100%; table-layout: auto; }
#cfCharges td:first-child input { width: 100%; min-width: 9em; }
#cfCharges .input-unit input { width: 5.5em; flex: none; }
#cfCharges select[data-cf-cp] { width: 7.5em; }
#cfCharges input[data-cf-cnote] { width: 100%; min-width: 6em; }

.pp-people { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.pp-people input { width: 6em; }

/* a number and its unit (the owner, 15 November) */
.input-unit { display: flex; align-items: center; gap: 6px; width: 100%; }
.input-unit > input { flex: 1; min-width: 0; }
.unit-word { font-size: 12px; color: var(--ink-3, #667085); white-space: nowrap; }
.fx-ils { font-size: .9em; color: var(--ink-3, #667085); margin-inline-start: 4px; white-space: nowrap; }
