/* Public build — overrides layered on top of style.css.
   Covers: the blue accent, withheld (locked) cards, the balance chip, the
   history table, the exhausted-quota state and the KW row column widths.
   Everything else inherits the internal build's styling. */

/* --- accent: blue instead of the internal build's green ---------------------
   style.css references the --green-* scale in ~20 places (card headers, row and
   button hovers, nav hovers, type tags, role dots). Remapping the scale itself
   recolours all of them coherently; patching selectors one by one would leave
   green tints behind on hover states and card headers. Lightness is kept
   parallel to the original scale so contrast is unchanged.                     */
:root {
  --green-900: #0d2740;
  --green-800: #16385a;   /* primary */
  --green-700: #1d4772;
  --green-600: #2a5f92;
  --green-500: #4a7fb0;
  --green-100: #d3e0ed;
  --green-50:  #eaf1f7;
}

/* --- withheld result: present, but deliberately empty and compact -----------
   A locked card carries no information, so it should not take the same vertical
   space as a real one — it only has to account for the gap in the list.        */
.entity-card--hidden {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.25rem;
  border-style: dashed;
  border-color: color-mix(in srgb, currentColor 18%, transparent);
  background: color-mix(in srgb, currentColor 3%, transparent);
}
.lock-icon { flex: none; opacity: .7; }
.hidden-title {
  font-weight: 600;
  font-size: .95rem;
  color: color-mix(in srgb, currentColor 62%, transparent);
}
.hidden-note {
  font-size: .84rem;
  color: color-mix(in srgb, currentColor 45%, transparent);
}
@media (max-width: 620px) {
  .entity-card--hidden { flex-wrap: wrap; }
}

/* --- balance chip ----------------------------------------------------------- */
.topnav { display: flex; align-items: center; }
.balance-chip {
  align-self: center;
  display: inline-flex;
  align-items: center;      /* baseline made the number sit low against the tabs */
  gap: .35rem;
  line-height: 1;
  padding: .42rem .75rem;
  margin-right: .6rem;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 999px;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.balance-chip strong { font-weight: 650; }
.balance-chip--low { border-color: #b4541f; color: #b4541f; }

/* --- exhausted quota -------------------------------------------------------- */
.quota-empty {
  margin: 1.25rem 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid #b4541f;
  border-left-width: 4px;
  border-radius: 4px;
  background: color-mix(in srgb, #b4541f 7%, transparent);
}
.quota-empty h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 650; }
.quota-empty p  { margin: 0; font-size: .9rem; opacity: .85; }

/* --- search hint: more air between the fields and the note ------------------- */
.search-hint { margin-top: 1.15rem; }

/* --- KW rows: dates and shares must never wrap ------------------------------
   "2012-03-19 – 2013-07-22" (the longest date form) overflowed the 188px column,
   so ranges broke onto a second line while open-ended entries did not; widening
   it then squeezed the share column, which broke in turn. Both are pinned.     */
.kw-row { grid-template-columns: 165px 1fr 170px 215px; }
.kw-dates, .kw-udzial { white-space: nowrap; }
@media (max-width: 900px) {
  .kw-row { grid-template-columns: 1fr; }
  .kw-dates, .kw-udzial { white-space: normal; }
}

/* --- history table ---------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.hist-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: .88rem;
}
.hist-table th {
  text-align: left;
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .6;
  padding: .5rem .7rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}
.hist-table td {
  padding: .55rem .7rem;
  border-bottom: 1px solid color-mix(in srgb, currentColor 9%, transparent);
  vertical-align: top;
}
.hist-table .col-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  width: 1%;
}
.hist-when { white-space: nowrap; font-variant-numeric: tabular-nums; opacity: .75; }
.hist-what { word-break: break-word; }

.panel-note { margin: -.35rem 0 1rem; font-size: .88rem; opacity: .75; }
.empty-state { opacity: .65; font-size: .92rem; }

/* --- login page -------------------------------------------------------------
   The internal build's mark and wordmark ("Fraser") were still on this screen —
   the first thing the external account sees. Replaced with the neutral mark. */
.login-title { margin-bottom: .15rem; }
.login-sub {
  margin: 0 0 1.4rem;
  font-size: .88rem;
  color: color-mix(in srgb, currentColor 55%, transparent);
}

/* --- identity provenance ----------------------------------------------------
   A deduced PESEL must never look like one recorded in the księga, and a card
   that stands alone because no identity could be confirmed must not read as
   "this person owns exactly one property".                                    */
.kw-deduced {
  margin-left: .15em;
  font-weight: 700;
  color: #b4541f;
  cursor: help;
}
.entity-single {
  font-size: .74rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .1rem .45rem;
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 3px;
  color: color-mix(in srgb, currentColor 52%, transparent);
  cursor: help;
  white-space: nowrap;
}

/* --- entry number ------------------------------------------------------------
   Dział II numbers each entry, and one KW can legitimately hold several entries
   for the same owner (separate acquisitions, separate shares). Without the
   number the rows read as duplicates.                                          */
.kw-wpis {
  margin-left: .5em;
  font-size: .72rem;
  letter-spacing: .02em;
  color: color-mix(in srgb, currentColor 45%, transparent);
  white-space: nowrap;
  cursor: help;
}

/* --- identifier not present in the books --------------------------------------
   Distinct from the per-KW star: there the identity is stated somewhere in the
   books and only the link to that one KW is deduced. Here the number itself
   appears nowhere in them.                                                      */
.entity-ident--outside { cursor: help; }
.ident-star {
  margin-left: .1em;
  font-weight: 700;
  color: #b4541f;
}
