/* Client portal (my.finwiz.co.il). Mobile first; the design is
   design/client-portal/v1: white ground, Heebo, one accent, one subject per
   screen. */

:root {
  --pt-text: #1d2b3a;
  --pt-muted: #5b6b7b;
  --pt-accent: #1f6fb2;
  --pt-accent-dark: #174f80;
  --pt-line: #eef1f5;
  --pt-border: #c9d2dc;
  --pt-ground: #ffffff;
  --pt-ground-soft: #f4f6f9;
  --pt-radius: 14px;
  --pt-ok: #1e7a46;
  --pt-warn: #a14d00;
  --pt-bad: #b3261e;
  /* Advisor mode: a warm tint, the only place it is used. */
  --pt-advisor-ground: #fff4e0;
  --pt-advisor-soft: #fffaf1;
  --pt-advisor-line: #f0d199;
  --pt-advisor-text: #6b3d00;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--pt-ground);
  color: var(--pt-text);
  font-family: Heebo, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

a { color: var(--pt-accent); }
a:hover { color: var(--pt-accent-dark); }

.pt-page { min-height: 100vh; }

/* Advisor mode: always on top, never mistaken for the client's own area. */
.pt-advisor-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 10px 16px;
  background: var(--pt-advisor-ground);
  border-bottom: 1px solid var(--pt-advisor-line);
  color: var(--pt-advisor-text);
  font-size: 15px;
}
.pt-advisor-bar__text strong { font-weight: 700; }
.pt-advisor-bar__sub { color: var(--pt-advisor-text); opacity: 0.8; font-size: 14px; }
.pt-advisor-bar form { margin: 0; }
.pt-advisor-bar__end {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--pt-advisor-line);
  border-radius: 999px;
  background: var(--pt-ground);
  color: var(--pt-advisor-text);
  font: inherit;
  cursor: pointer;
}

/* The advisor's tools on a folder or document page: quiet, set apart by a
   tinted ground and a small label, never by loud colour. */
.pt-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 18px 18px;
  border: 1px solid var(--pt-advisor-line);
  border-radius: var(--pt-radius);
  background: var(--pt-advisor-soft);
}
.pt-tools__title {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--pt-advisor-text);
}
.pt-tools__group { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.pt-tools__label { margin: 0; font-size: 15px; color: var(--pt-muted); }
.pt-tools__row { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pt-tools__button { height: 44px; padding: 0 18px; font-size: 15px; }
.pt-tools .pt-button--quiet { background: var(--pt-ground); }
.pt-tools .pt-files { margin: 0; }
.pt-tools__form { margin-top: 8px; }
.pt-textarea {
  height: auto;
  min-height: 120px;
  width: 100%;
  padding: 12px 16px;
  text-align: right;
  resize: vertical;
  line-height: 1.5;
}
.pt-input--text { width: 100%; text-align: right; }

/* --- sign-in screens ------------------------------------------------------ */

.pt-auth {
  max-width: 440px;
  margin: 0 auto;
  padding: 96px 28px 48px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.pt-stack { display: flex; flex-direction: column; gap: 16px; }

.pt-logo { height: 36px; width: auto; align-self: flex-start; }
.pt-logo--center { height: 56px; align-self: center; }

/* Another office's mark (portal/_office_mark.html): its logo kept to the
   logo's box, or its name in words, quiet, in the text colour. */
.pt-office-logo { max-width: min(220px, 60vw); object-fit: contain; }
.pt-office-name {
  display: block;
  max-width: min(260px, 60vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--pt-text);
}
.pt-logo--name { font-size: 20px; line-height: 36px; align-self: flex-start; }
.pt-signin__logo--name { font-size: 22px; line-height: 40px; margin: 0 auto; text-align: center; }

.pt-title { margin: 0; font-size: 30px; font-weight: 700; }
.pt-title--large { font-size: 32px; }
.pt-lead { margin: 0; font-size: 19px; }
.pt-muted { margin: 0; color: var(--pt-muted); }
.pt-label { font-size: 15px; color: var(--pt-muted); }

.pt-input {
  height: 56px;
  border-radius: var(--pt-radius);
  border: 1px solid var(--pt-border);
  padding: 0 16px;
  font: inherit;
  text-align: left;
}
.pt-input:focus { outline: 2px solid var(--pt-accent); outline-offset: 1px; }

.pt-button {
  height: 56px;
  border: none;
  border-radius: var(--pt-radius);
  background: var(--pt-accent);
  color: #ffffff;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.pt-button:hover { background: var(--pt-accent-dark); color: #ffffff; }
.pt-button--quiet { background: var(--pt-ground-soft); color: var(--pt-text); }
.pt-button--quiet:hover { background: var(--pt-line); color: var(--pt-text); }
/* A few actions: one under the other on a phone, side by side on a desktop.
   A long label wraps inside its button rather than widening it. */
.pt-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.pt-actions form { margin: 0; display: flex; }
.pt-actions .pt-button { width: 100%; height: auto; min-height: 56px; padding: 8px 16px; text-align: center; line-height: 1.3; }
@media (min-width: 720px) {
  .pt-actions { flex-direction: row; }
  .pt-actions form { flex: 1 1 0; }
}

.pt-link { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }

.pt-link-button {
  min-height: 44px;
  border: none;
  background: none;
  color: var(--pt-muted);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
}

/* --- hub: one list of large rows ------------------------------------------ */

.pt-hub {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.pt-hub__top { display: flex; justify-content: space-between; align-items: center; }

.pt-rows { display: flex; flex-direction: column; }

.pt-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  border-bottom: 1px solid var(--pt-line);
  color: var(--pt-text);
  text-decoration: none;
}
.pt-row:hover { color: var(--pt-text); background: var(--pt-ground-soft); }
.pt-row__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pt-row__title { font-size: 19px; font-weight: 500; }
.pt-row__sub { font-size: 15px; color: var(--pt-muted); }
.pt-row__sub--alert { color: var(--pt-warn); }
.pt-chevron { color: #9aa6b2; flex-shrink: 0; }

/* The home's second group: the sections the client has nothing in yet. Closed
   until asked for, and quieter than the rows above it. */
.pt-more__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  margin-top: 16px;
  color: var(--pt-muted);
  font-size: 16px; /* fw-allow: the hub loads no design tokens; its rows are in px */
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.pt-more__head::-webkit-details-marker { display: none; }
.pt-more__head:hover { color: var(--pt-text); }
.pt-more__head:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-more__caret { flex-shrink: 0; transition: transform 0.2s ease; }
.pt-more[open] > .pt-more__head .pt-more__caret { transform: rotate(180deg); }
.pt-more[open] > .pt-more__head { border-bottom: 1px solid var(--pt-line); }
.pt-row--quiet { min-height: 64px; }
.pt-row--quiet .pt-row__title { font-size: 17px; font-weight: 400; color: var(--pt-muted); } /* fw-allow: the hub loads no design tokens; its rows are in px */
.pt-row--quiet:hover .pt-row__title { color: var(--pt-text); }

.pt-back {
  width: 44px;
  height: 44px;
  margin-inline-start: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pt-text);
}

.pt-stack--tight { gap: 6px; }

/* --- documents ------------------------------------------------------------ */

.pt-group { display: flex; flex-direction: column; gap: 4px; }
.pt-group__title { margin: 8px 0 0; font-size: 15px; font-weight: 500; color: var(--pt-muted); }

/* Colour is never the only signal: every state is also a word. */
.pt-state { font-size: 15px; font-weight: 500; }
.pt-state--ok { color: var(--pt-ok); }
.pt-state--missing { color: var(--pt-warn); }
.pt-state--problem { color: var(--pt-bad); }
.pt-state--pending { color: var(--pt-accent); }

.pt-notice {
  background: #fbeceb;
  border-radius: var(--pt-radius);
  padding: 14px 18px;
}
.pt-list { margin: 0; padding-inline-start: 18px; display: flex; flex-direction: column; gap: 6px; }

.pt-details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--pt-accent); }
.pt-explanation { margin: 8px 0 0; color: var(--pt-text); }

.pt-files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.pt-file {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  align-items: center;
  border-bottom: 1px solid var(--pt-line);
}
.pt-file__name { overflow-wrap: anywhere; }

.pt-file__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 0; }
.pt-file__actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pt-file__actions form { margin: 0; }
.pt-files--nested { margin: 0; padding-inline-start: 36px; }

.pt-link-button--accent { color: var(--pt-accent); }
.pt-link-button--danger { color: var(--pt-bad); display: inline-flex; align-items: center; text-decoration: none; }
.pt-button--danger { background: var(--pt-bad); }
.pt-button--danger:hover { background: #8f1e18; }

/* --- progress: how much of the folder is in -------------------------------- */

.pt-progress { display: flex; flex-direction: column; gap: 8px; }
.pt-progress__head { display: flex; align-items: baseline; gap: 12px; }
.pt-progress__percent { font-size: 28px; font-weight: 700; }
.pt-progress__count { color: var(--pt-muted); font-size: 15px; }
.pt-progress__track { height: 10px; border-radius: 999px; background: var(--pt-line); overflow: hidden; }
.pt-progress__fill { height: 100%; border-radius: inherit; background: var(--pt-accent); transition: width 0.4s ease; }
.pt-progress__fill.is-done { background: var(--pt-ok); }

/* --- folders, as in Drive --------------------------------------------------- */

.pt-folder-icon { color: var(--pt-muted); flex-shrink: 0; }
.pt-crumb { margin: 0; color: var(--pt-muted); font-size: 15px; }

.pt-sub { display: flex; flex-direction: column; border-bottom: 1px solid var(--pt-line); padding-bottom: 8px; }
.pt-sub__head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  color: var(--pt-text);
  text-decoration: none;
}
.pt-sub__head:hover { color: var(--pt-text); background: var(--pt-ground-soft); }
.pt-sub__title { font-size: 18px; font-weight: 500; }
.pt-sub__go { color: var(--pt-accent); font-size: 15px; flex-shrink: 0; }
.pt-sub__empty { padding-inline-start: 36px; padding-bottom: 8px; font-size: 15px; }

/* A folder page: each sub-folder is a row that opens in place. The height
   grows from nothing (grid rows 0fr → 1fr) with an ease-out, and the content
   fades in, so the row flows open rather than jumping. A pointer resting on
   the row opens it; a tap on the name ticks the hidden checkbox, which holds
   it open. */
.pt-folds { display: flex; flex-direction: column; }
.pt-fold { border-bottom: 1px solid var(--pt-line); }
.pt-fold__toggle { position: absolute; opacity: 0; pointer-events: none; }
.pt-fold__head { display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 8px 0; }
.pt-fold__name {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 44px;
  justify-content: center;
  color: var(--pt-text);
  text-decoration: none;
}
.pt-fold__name:hover { color: var(--pt-text); }
.pt-fold__name:hover .pt-sub__title { color: var(--pt-accent); text-decoration: underline; text-underline-offset: 3px; }
/* The caret that opens a row in place on a touch screen. */
.pt-fold__peek {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  color: var(--pt-muted);
  cursor: pointer;
}
.pt-fold__peek:hover { background: var(--pt-ground-soft); color: var(--pt-text); }
.pt-fold__peek svg { transition: transform 0.2s ease; }
.pt-fold__toggle:checked ~ .pt-fold__head .pt-fold__peek svg { transform: rotate(180deg); }

/* The folder page's sections: ריק / לא תקין, בבדיקה, בוצע. Each opens and
   closes on its own caret; a folder moves between them as its state changes. */
.pt-group { border-top: 1px solid var(--pt-border); }
.pt-group:last-of-type { border-bottom: 1px solid var(--pt-border); }
.pt-group__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.pt-group__head::-webkit-details-marker { display: none; }
.pt-group__head:hover { background: var(--pt-ground-soft); }
.pt-group__head:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-group__caret { color: var(--pt-muted); flex-shrink: 0; transform: rotate(90deg); transition: transform 0.2s ease; }
[dir="ltr"] .pt-group__caret { transform: rotate(-90deg); }
.pt-group[open] > .pt-group__head .pt-group__caret { transform: none; }
.pt-group__title { font-size: 17px; font-weight: 600; }
.pt-group__count {
  min-width: 26px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--pt-line);
  color: var(--pt-muted);
  font-size: 14px;
  text-align: center;
}
.pt-group--to_do .pt-group__count { background: color-mix(in srgb, var(--pt-bad) 12%, var(--pt-ground)); color: var(--pt-bad); }
.pt-group--done .pt-group__count { background: color-mix(in srgb, var(--pt-ok) 12%, var(--pt-ground)); color: var(--pt-ok); }
.pt-group .pt-folds { padding-bottom: 8px; }
.pt-group .pt-fold:last-child { border-bottom: 0; }
.pt-fold__go { display: flex; align-items: center; gap: 4px; min-height: 44px; text-decoration: none; }
.pt-fold__body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.28s ease;
}
.pt-fold__inner { overflow: hidden; min-height: 0; padding-inline-start: 36px; }
.pt-fold__toggle:checked ~ .pt-fold__body { grid-template-rows: 1fr; opacity: 1; }
@media (hover: hover) {
  .pt-fold:hover .pt-fold__body { grid-template-rows: 1fr; opacity: 1; }
  .pt-fold:hover .pt-fold__head { background: var(--pt-ground-soft); }
}
.pt-fold__toggle:focus-visible ~ .pt-fold__head .pt-fold__peek { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-fold__problems { margin: 0 0 4px; padding-inline-start: 18px; color: var(--pt-bad); font-size: 15px; }
.pt-fold__empty { margin: 0; padding-bottom: 12px; font-size: 15px; }
.pt-fold__inner .pt-files { margin: 0 0 8px; }
@media (prefers-reduced-motion: reduce) {
  .pt-fold__body { transition: none; }
  .pt-group__caret, .pt-fold__peek svg { transition: none; }
}

/* --- settings --------------------------------------------------------------- */

.pt-hub__icons { display: flex; align-items: center; gap: 4px; }

.pt-icon-link {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--pt-muted);
}
.pt-icon-link:hover { color: var(--pt-text); background: var(--pt-ground-soft); }
.pt-icon-link:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 1px; }
/* A new announcement. The link's label says so too: colour is never the only signal. */
.pt-dot {
  position: absolute;
  top: 9px;
  inset-inline-end: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pt-bad);
  border: 2px solid var(--pt-ground);
}

/* --- announcements ---------------------------------------------------------- */

.pt-messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pt-message { padding: 18px 0; border-bottom: 1px solid var(--pt-line); display: flex; flex-direction: column; gap: 4px; }
.pt-message__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pt-message__title { margin: 0; font-size: 19px; font-weight: 500; }
.pt-message__new { font-size: 13px; font-weight: 700; color: var(--pt-bad); }
.pt-message__date { font-size: 15px; color: var(--pt-muted); }
.pt-message__body { margin: 4px 0 0; white-space: pre-line; overflow-wrap: anywhere; }

/* A card mail's attachments, under its text. */
.pt-attachments { margin-top: 10px; }
.pt-attachments__title { margin: 0 0 2px; font-size: 14px; font-weight: 500; color: var(--pt-muted); }
.pt-attachments__list { list-style: none; margin: 0; padding: 0; }
.pt-attachment { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 44px; overflow-wrap: anywhere; }
.pt-attachment__icon { flex: none; color: var(--pt-muted); }
.pt-attachment__note { font-size: 14px; }

/* A document check's defects. A table from 720px; under it each row is a
   block, and each cell names its column, so nothing scrolls sideways. */
.pt-hub--wide { max-width: 960px; }
.pt-defects { width: 100%; margin-top: 12px; border-collapse: separate; border-spacing: 0; font-size: 16px; }
.pt-defects thead { display: none; }
.pt-defects tr {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  padding: 14px 16px;
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  background: var(--pt-ground);
}
.pt-defects td { display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.pt-defects td::before { content: attr(data-label); font-size: 13px; color: var(--pt-muted); }
.pt-defects form { margin: 0; }
.pt-defects__subject { font-weight: 500; }
.pt-defects__problem { color: var(--pt-bad); }
.pt-defects__link {
  min-height: 44px;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--pt-accent);
  text-align: start;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.pt-defects__link:hover { color: var(--pt-accent-dark); }
@media (min-width: 720px) {
  .pt-defects { display: table; border: 1px solid var(--pt-border); border-radius: var(--pt-radius); overflow: hidden; }
  .pt-defects thead { display: table-header-group; }
  .pt-defects tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .pt-defects th {
    padding: 12px 14px;
    background: var(--pt-ground-soft);
    font-size: 14px;
    font-weight: 500;
    color: var(--pt-muted);
    text-align: start;
    border-bottom: 1px solid var(--pt-border);
  }
  .pt-defects td { display: table-cell; padding: 10px 14px; vertical-align: middle; border-bottom: 1px solid var(--pt-line); }
  .pt-defects td::before { content: none; }
  .pt-defects tbody tr:last-child td { border-bottom: 0; }
  .pt-defects tbody tr:nth-child(even) td { background: var(--pt-ground-soft); }
  .pt-defects__subject { width: 34%; }
}

.pt-settings { display: flex; flex-direction: column; gap: 28px; }
.pt-fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.pt-legend { padding: 0; margin-bottom: 8px; font-size: 19px; font-weight: 500; }
.pt-hint { font-size: 15px; }
.pt-address { text-align: right; }
.pt-add { align-self: flex-start; padding: 0; }
.pt-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  cursor: pointer;
}
.pt-check:has(input:checked) { border-color: var(--pt-accent); background: var(--pt-accent-tint, #eef5fb); }
.pt-check:has(input:focus-visible) { outline: 2px solid var(--pt-accent); outline-offset: 1px; }
.pt-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--pt-accent); }
.pt-check__text { display: flex; flex-direction: column; padding: 6px 0; }
.pt-check__sub { color: var(--pt-muted); font-size: 15px; text-align: right; }
.pt-extra { display: flex; gap: 8px; align-items: center; }
.pt-input--grow { flex: 1; min-width: 0; }
.pt-field-error { margin: 0; color: var(--pt-bad); font-size: 15px; }
.pt-saved { margin: 0; padding: 12px 16px; border-radius: var(--pt-radius); background: #e8f4ec; color: var(--pt-ok); }
.pt-signout { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--pt-line); display: flex; flex-direction: column; }
.pt-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

/* --- choosing two proposals to compare ------------------------------------ */

.pt-compare { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.pt-compare select.pt-input { text-align: right; background: var(--pt-ground); }

/* --- upload --------------------------------------------------------------- */

.pt-upload { display: flex; flex-direction: column; gap: 12px; }
.pt-upload.is-sending { opacity: 0.6; pointer-events: none; }
.pt-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pt-upload label { position: relative; }
.pt-upload label:focus-within { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-upload__error { margin: 0; color: var(--pt-bad); white-space: pre-line; }

.pt-upload-box { margin: 0; padding: 0; border: 0; min-width: 0; }
.pt-upload-box:disabled { opacity: 0.55; }
.pt-upload-box:disabled .pt-button { cursor: not-allowed; }
.pt-drop[role="button"] { cursor: pointer; }
.pt-drop[role="button"]:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.pt-upload-box:disabled .pt-drop { cursor: not-allowed; }

.pt-drop {
  border: 2px dashed var(--pt-border);
  border-radius: 20px;
  padding: 28px 16px;
  text-align: center;
}
.pt-drop.is-over { border-color: var(--pt-accent); background: var(--pt-ground-soft); }
.pt-drop__text { margin: 0; font-size: 18px; }
.pt-drop__hint { font-size: 14px; }

/* A phone has a camera and no drag and drop; a desktop the other way round. */
@media (hover: none) and (pointer: coarse) {
  .pt-drop { display: none; }
}
@media (hover: hover) and (pointer: fine) {
  .pt-camera { display: none; }
}

/* העלאה כללית on the documents page: one box for any file, sorted by the office. */
.pt-drop-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 16px;
  border-radius: 20px; /* fw-allow: the portal page loads no --fw-* tokens, the --pt-* boxes use px */
  background: var(--pt-ground-soft);
}
.pt-drop-box__title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.35; } /* fw-allow: the portal page loads no --fw-* tokens, the --pt-* rows use px */
.pt-drop-box .pt-drop { background: var(--pt-ground); }
.pt-drop-box .pt-drop.is-over { background: var(--pt-line); }
.pt-drop-box .pt-button--quiet { background: var(--pt-ground); }
.pt-drop-box .pt-button--quiet:hover { background: var(--pt-line); }
.pt-drop-box__buttons { display: flex; flex-direction: column; gap: 8px; }
.pt-drop-box__lines { margin: 0; }
.pt-drop-box__lines .pt-file { border-bottom-color: var(--pt-border); }
.pt-drop-box__lines .pt-file:last-child { border-bottom: 0; }

/* הנתונים שלי: the client window's tabs (client_sheet/css/sheet.css), for the client to change.
   The window fills the screen and scrolls inside; here the page itself scrolls. */
.pt-sheet-body { background: var(--fw-bg); color: var(--fw-text); }
.pt-sheet { display: flex; flex-direction: column; min-height: 100vh; }
.pt-sheet .cs-header-top { align-items: center; }
.pt-sheet .pt-back { flex-shrink: 0; }
.pt-sheet__hint { margin-inline-start: auto; font-size: var(--fw-fs-md); display: flex; flex-direction: column; gap: 2px; }
.pt-sheet__hint p { margin: 0; }
/* The save's line keeps its height, so the header does not jump when it fills. */
.pt-sheet__status { min-height: 1.4em; }
.pt-sheet__main { overflow: visible; }
/* The advisor's actions (add a bridge, reset a cost) are switched off here: not shown at all. */
.pt-sheet .cs-bridge-toggle:disabled,
.pt-sheet .cs-icon-action:disabled { display: none; }
@media (max-width: 760px) {
  .pt-sheet .cs-header { padding: 12px 16px 0; }
  .pt-sheet__hint { margin-inline-start: 0; flex-basis: 100%; }
}

/* תיכנון תזרים מזומנים עתידי: the client window's simulator (core/css/cashflow-simulator*.css,
   scoped to .cs-instance), on the client window's grey ground, as wide as the page allows. */
.pt-simulator {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.pt-simulator__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; }
.pt-simulator__head .pt-title { margin: 0; }
/* The save's line: sheet.css is not on this page (its names meet the story's). */
.pt-simulator .pt-sheet__status { color: var(--fw-text-secondary); font-size: var(--fw-fs-xs); }
.pt-simulator .pt-sheet__status[data-kind="error"] { color: var(--fw-danger); }
.pt-simulator__head .pt-sheet__hint { margin-inline-start: auto; }
.pt-simulator .cs-instance { min-width: 0; }
@media (max-width: 760px) {
  .pt-simulator__head .pt-sheet__hint { margin-inline-start: 0; flex-basis: 100%; }
}

/* תכנון המשכנתא שלי: the runs in the Finwiz table, as wide as the page allows. */
.pt-plan {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pt-plan__table { min-width: 0; overflow-x: auto; }
/* The row's actions as the client window's runs table draws them: icons on
   one line, named on hover, muted until pointed at (client_sheet/css/sheet.css .cs-synth). */
.pt-plan .fw-actions-cell { white-space: nowrap; text-align: center; }
.pt-plan .fw-action-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 1px;
  padding: 6px;
  border: none;
  background: transparent;
  line-height: 0;
  cursor: pointer;
  border-radius: var(--fw-radius-xs);
  color: var(--fw-text-secondary);
}
.pt-plan .fw-action-icon-btn:hover { background: var(--fw-fill); color: var(--fw-text); }
.pt-plan .fw-action-icon-btn:focus-visible { outline: none; box-shadow: var(--fw-focus-ring); }
.pt-plan .ins-table thead th,
.pt-plan .ins-table tbody td { padding: 8px; }
/* The runs page stays on the portal's white ground, not the client window's grey. */
.pt-sheet-body.pt-plan-body { background: var(--pt-ground); }
/* A line around each cell, so the eye can tell one cell from the next. */
.pt-plan .ins-table { border-collapse: collapse; }
.pt-plan .ins-table thead th,
.pt-plan .ins-table tbody td { border: 1px solid var(--fw-border); }

/* התזרים שלי: the list of analyses, and the two ways to start one. */
.pt-cashflow__start {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
/* A shut form: shown, but not usable. */
.pt-cashflow__start:disabled { opacity: 0.55; }
.pt-cashflow__start:disabled .pt-button { cursor: not-allowed; }
.pt-cashflow__form {
  padding: 16px;
  border: 1px solid var(--pt-line);
  border-radius: 12px;
  background: var(--pt-ground);
}
.pt-cashflow__heading { margin: 0; font-size: 18px; }
.pt-cashflow__picked { margin: 0; padding-inline-start: 20px; font-size: 14px; overflow-wrap: anywhere; }
.pt-cashflow__errors { display: flex; flex-direction: column; gap: 4px; }

/* One analysis: the advisor's dashboard fills the screen below the top line and
   scrolls inside its tabs, as it does in the advisor's calculators section. */
.pt-cashflow-run { display: flex; flex-direction: column; height: 100vh; min-height: 560px; }
.pt-cashflow-run__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 12px 16px 0;
}
.pt-cashflow-run__note { margin: 0; font-size: 14px; }
.pt-cashflow-run__delete { margin-inline-start: auto; }
.pt-cashflow-run__tool { display: flex; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
.ca-save-status { font-size: 13px; color: var(--fw-text-secondary); }
.ca-save-status.is-failed { color: var(--fw-danger); font-weight: 600; }
@media (max-width: 760px) {
  .pt-cashflow-run__delete { margin-inline-start: 0; }
}

/* --- home: where the client stands in the process -------------------------- */
/* Five steps on one line, the line behind the dots joins them. Done steps are
   filled, the current one is ringed and named in bold, later ones are muted. */
.pt-journey__steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.pt-journey__step {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  color: var(--pt-muted);
}
.pt-journey__step + .pt-journey__step::before {
  content: "";
  position: absolute;
  top: 11px;
  inset-inline-end: 50%;
  width: 100%;
  height: 2px;
  background: var(--pt-line);
}
.pt-journey__step.is-done + .pt-journey__step::before,
.pt-journey__step.is-done + .pt-journey__step.is-current::before { background: var(--pt-accent); }
.pt-journey__dot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--pt-border);
  background: var(--pt-ground);
  color: var(--pt-ground);
}
.pt-journey__step.is-done .pt-journey__dot { border-color: var(--pt-accent); background: var(--pt-accent); }
.pt-journey__step.is-current .pt-journey__dot {
  border-color: var(--pt-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pt-accent) 18%, transparent);
}
.pt-journey__step.is-current .pt-journey__dot::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pt-accent);
}
.pt-journey__title { font-size: 14px; line-height: 1.3; padding-inline: 2px; } /* fw-allow: the portal page loads no --fw-* tokens, the --pt-* rows use px */
.pt-journey__step.is-done .pt-journey__title { color: var(--pt-text); }
.pt-journey__step.is-current .pt-journey__title { color: var(--pt-text); font-weight: 700; }
@media (min-width: 560px) {
  .pt-journey__title { font-size: 15px; } /* fw-allow: the portal page loads no --fw-* tokens, the --pt-* rows use px */
}
/* הערות: the run's note is typed in its cell; it fills the cell, never under 10em. */
.pt-plan .pt-plan-note { width: 100%; min-width: 10em; box-sizing: border-box; }

/* --- the wait mark: a long task runs (portal/_wait_mark.html) ---------------- */
/* Finwiz's letters rise one after the other, then rest; another office's logo
   breathes; an office with no logo gets a ring in its accent. All on one cycle,
   which wait-mark.js keeps in step across the page's reloads (--pt-wait-phase). */

.pt-wait {
  --pt-wait-cycle: 2400ms;
  display: flex;
  align-items: center;
  justify-content: flex-start; /* the page's start, over the title */
  min-height: 96px;
  margin: 24px 0 0;
}
.pt-wait__word { display: block; width: 168px; height: auto; overflow: visible; direction: ltr; }
.pt-wait__word path {
  animation: pt-wait-rise var(--pt-wait-cycle) cubic-bezier(0.45, 0, 0.25, 1) infinite;
  animation-delay: calc(var(--pt-wait-phase, 0ms) + var(--pt-wait-step, 0ms));
}
/* f i n w i z, left to right; the last path is the second i's dot, with its i. */
.pt-wait__word path:nth-child(2) { --pt-wait-step: 120ms; }
.pt-wait__word path:nth-child(3) { --pt-wait-step: 240ms; }
.pt-wait__word path:nth-child(4) { --pt-wait-step: 360ms; }
.pt-wait__word path:nth-child(5),
.pt-wait__word path:nth-child(7) { --pt-wait-step: 480ms; }
.pt-wait__word path:nth-child(6) { --pt-wait-step: 600ms; }
@keyframes pt-wait-rise {
  0%, 34%, 100% { transform: translateY(0); }
  14% { transform: translateY(-14px); } /* viewBox units: about an eighth of the word's height */
}

.pt-wait__logo {
  display: block;
  max-width: 180px;
  max-height: 80px;
  object-fit: contain;
  animation: pt-wait-breathe var(--pt-wait-cycle) ease-in-out infinite;
  animation-delay: var(--pt-wait-phase, 0ms);
}
@keyframes pt-wait-breathe {
  0%, 100% { transform: scale(0.94); opacity: 0.65; }
  50% { transform: scale(1); opacity: 1; }
}

.pt-wait__ring {
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid var(--pt-line);
  border-top-color: var(--pt-accent);
  /* A third of the cycle, so the phase lands on a whole turn. */
  animation: pt-wait-turn calc(var(--pt-wait-cycle) / 3) linear infinite;
  animation-delay: var(--pt-wait-phase, 0ms);
}
@keyframes pt-wait-turn { to { transform: rotate(360deg); } }

/* Less motion asked for: nothing moves; the mark only fades in and out. */
@keyframes pt-wait-fade {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-wait__word path { animation: none; }
  .pt-wait__word,
  .pt-wait__logo,
  .pt-wait__ring {
    animation: pt-wait-fade var(--pt-wait-cycle) ease-in-out infinite;
    animation-delay: var(--pt-wait-phase, 0ms);
  }
}
