/* One presentation for a property, shared by all four research pages.
 *
 * Before this file the same object was shown four different ways: the column
 * order differed page to page (price second here, distance second there), the
 * heading was "Место" on three pages and "Локация" on the fourth, and the fact
 * chips used .specs on one page and .facts on another. Reading two pages side
 * by side meant re-learning the layout each time.
 *
 * The contract, in this order, always:
 *   МЕСТО · ЦЕНА · УЧАСТОК · ДОМ · СОСТОЯНИЕ · <measurements> · ПРИМЕЧАНИЕ
 * A page omits a column it has no data for; it never reorders or renames one.
 * Measurements are what each study actually measured — до пляжа, соседи, вид —
 * and they always sit after the physical facts, never mixed into them.
 *
 * Loaded after the page's own stylesheet, so it overrides by position.
 */

/* ---------- the object table ---------- */
.tbl table th,
.table-scroll table th {
  font-family: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

/* every numeric column reads as a number, on every page */
.tbl td.num,
.table-scroll td.num {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* the place cell is the anchor: name on top, listing chips under it */
.tbl td .place-name,
.table-scroll td .place-name {
  font-weight: 600;
  display: inline;
}
.tbl td .place-sub,
.table-scroll td .place-sub {
  display: block;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 1px;
  font-family: "Familjen Grotesk", sans-serif;
}

/* a measured value that is a verdict, not a number, reads as a chip */
.m {
  display: inline-block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .02em;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}
.m-good { background: var(--budget-soft, #DCEBE0); color: var(--budget, #3E7B4F); }
.m-mid  { background: var(--sunk); color: var(--ink-2); }
.m-bad  { background: var(--ref-soft, #F6DCE3); color: var(--ref, #A81E42); }
.m-none { background: transparent; color: var(--ink-3); border: 1px dashed var(--line); }

/* ---------- the object card ---------- */
/* .specs was the odd one out; both names now resolve to the same component */
.card .specs,
.card .facts,
.obj .facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.card .specs li,
.card .facts li,
.obj .facts li {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  padding: 4px 9px;
  border-radius: 3px;
  background: var(--sunk);
  color: var(--ink-2);
  border: 0;
}
/* the headline fact of a card — the plot — is the one that gets the accent */
.card .specs li.hero,
.card .facts li.key,
.obj .facts li.key {
  background: var(--sea-soft, var(--ac-soft, var(--budget-soft)));
  color: var(--sea, var(--ac, var(--budget)));
  font-weight: 500;
}

/* measurements block inside a card: label left, verdict right, same on every page */
.card .verdicts, .obj .verdicts { display: grid; gap: 8px; margin: 0 0 14px; }
.card .verdict, .obj .verdict {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  align-items: start; font-size: 14.5px; line-height: 1.5;
}
.card .verdict .k, .obj .verdict .k {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3); padding-top: 3px;
}

/* listing links: one look everywhere */
.card .links, .obj .links, .ids {
  display: flex; flex-wrap: wrap; gap: 5px; margin: 0; padding: 0; list-style: none;
}
.card .links a, .obj .links a, .ids a {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--ink-3);
  text-decoration: none;
  border: 1px solid var(--line-soft);
  border-radius: 3px;
  padding: 3px 8px;
  background: var(--surface);
  transition: color .15s, border-color .15s;
}
.card .links a:hover, .obj .links a:hover, .ids a:hover,
.card .links a:focus-visible, .obj .links a:focus-visible, .ids a:focus-visible {
  color: var(--sea, var(--ac)); border-color: var(--sea, var(--ac));
}

@media (max-width: 640px) {
  .card .verdict, .obj .verdict { grid-template-columns: 1fr; gap: 2px; }
  .card .verdict .k, .obj .verdict .k { padding-top: 0; }
}

/* ---------- dossier badge ---------- */
/* Marks an object that has a full hand-built dossier of its own. Deliberately
   louder than a listing chip: it is the difference between "here is the advert"
   and "here is everything we established about this parcel". */
.dossier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: .02em;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 3px;
  white-space: nowrap;
  vertical-align: 1px;
  background: var(--ref-soft, #F6DCE3);
  color: var(--ref, #A81E42);
  border: 1px solid transparent;
  transition: border-color .15s, filter .15s;
}
.dossier-badge:hover,
.dossier-badge:focus-visible {
  border-color: currentColor;
  filter: brightness(.96);
}
.dossier-badge svg { flex: 0 0 auto; }
tr.hl .dossier-badge { background: var(--surface); }
@media (any-pointer: coarse) {
  .dossier-badge { padding: 8px 11px; font-size: 11px; }
}

/* ---------- the single-object breakdown ---------- */
/* One object taken apart line by line, as opposed to a row in a table. It
 * started on /playa/ for the Taboido house and /casas/ needed the same block
 * for Xuvia the next hour, so it lives here rather than being copied — the
 * whole point of this file.
 *
 * Colours and fonts resolve through a fallback chain because the four pages
 * carry four palettes and four type systems: the accent is --sea on /playa/
 * and --brick on /casas/, and the mono face is JetBrains Mono on one page and
 * Azeret Mono on the other. A hard-coded name would silently fall back to
 * Arial on the page that does not load it.
 */
.obj { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 6px; overflow: hidden; }
.obj-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--line-soft); background: var(--sunk); }
.obj-head h3 { font-size: 19px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.015em; }
.obj-head h3 a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.obj-head h3 a:hover { border-bottom-color: currentColor; }
.obj-sub {
  margin: 0;
  font-family: "JetBrains Mono", "Azeret Mono", ui-monospace, monospace;
  font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.obj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.obj-col { padding: 20px 22px; }
.obj-col + .obj-col { border-left: 1px solid var(--line-soft); }
.obj-col h4 {
  font-family: "Familjen Grotesk", "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sea, var(--ac, var(--brick, #1C6B6E))); font-weight: 600; margin: 0 0 14px;
}
.obj dl { margin: 0; font-size: 14.5px; line-height: 1.55; }
.obj dt {
  font-family: "Familjen Grotesk", "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-top: 13px;
}
.obj dt:first-child { margin-top: 0; }
.obj dd { margin: 3px 0 0; color: var(--ink-2); }
.obj dd b { color: var(--ink); font-weight: 600; }
.obj dd code {
  font-family: "JetBrains Mono", "Azeret Mono", ui-monospace, monospace;
  font-size: 12px; background: var(--sunk); padding: 1px 5px; border-radius: 3px;
}
.obj-gap {
  margin: 0; padding: 18px 22px; border-top: 1px solid var(--line-soft);
  background: var(--ref-soft, var(--brick-soft, #F6DCE3));
  font-size: 14.5px; line-height: 1.6; color: var(--ink-2);
}
.obj-gap b { color: var(--ink); font-weight: 600; }
@media (max-width: 720px) {
  .obj-grid { grid-template-columns: 1fr; }
  .obj-col + .obj-col { border-left: none; border-top: 1px solid var(--line-soft); }
}
