/* ============================================================
   Plinth by Finclara — App chrome & components  (v1.0.0)
   Broadsheet aesthetic, app-tuned. Built on tokens.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  touch-action: manipulation;
}

button { font-family: inherit; }
a { color: var(--accent-2); }

/* ── Masthead ── */
.masthead {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  padding: calc(var(--safe-t) + 8px) var(--sp-4) 8px;
  min-height: calc(var(--mast-h) + var(--safe-t));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: var(--hairline);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.wordmark {
  font-family: var(--serif);
  font-weight: 740;
  font-size: 21px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark .dot { color: var(--saffron); }
.mast-sub {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 3px;
}
.mast-spacer { flex: 1; }
.mast-chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: var(--r-1);
  background: transparent;
  color: var(--ink);
  padding: 6px 10px;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out);
}
.mast-chip:active { transform: scale(0.94); }

/* ── Offline banner ── */
.offline-banner {
  position: fixed;
  top: calc(var(--mast-h) + var(--safe-t));
  left: 0; right: 0;
  z-index: var(--z-banner);
  background: var(--saffron);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 5px 10px;
  transform: translateY(-140%);
  visibility: hidden; /* v1.2.1: translateY alone never cleared cutout-phone insets — banner was permanently visible (z 50 > masthead 40) */
  transition: transform var(--dur-2) var(--ease-out), visibility 0s var(--dur-2);
}
body.offline .offline-banner { transform: translateY(0); visibility: visible; transition: transform var(--dur-2) var(--ease-out); }

/* ── Views ── */
main {
  padding-top: calc(var(--mast-h) + var(--safe-t));
  padding-bottom: calc(var(--tab-h) + var(--safe-b));
}
.view { display: none; }
.view.on {
  display: block;
  animation: viewin var(--dur-2) var(--ease-out);
}
@keyframes viewin {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}
.view-pad { padding: var(--sp-4); }

.subhead {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
}
.subhead h1 {
  font-family: var(--serif);
  font-weight: 740;
  font-size: var(--fs-title);
  margin: 0;
  letter-spacing: -0.01em;
}
.subhead .note {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-soft);
}
.subhead .spacer { flex: 1; }

/* ── Tab bar ── */
.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 45;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 1.5px solid var(--ink);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  position: relative;
  padding-top: 2px;
}
.tab svg {
  width: 23px; height: 23px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur-2) var(--ease-spring);
}
.tab:active svg { transform: scale(0.86); }
.tab .glyph {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  height: 23px;
  display: flex;
  align-items: center;
  transition: transform var(--dur-2) var(--ease-spring);
}
.tab:active .glyph { transform: scale(0.86); }
.tab .tl {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tab::after {
  content: "";
  position: absolute;
  top: -1.5px; left: 22%; right: 22%;
  height: 2.5px;
  background: var(--saffron);
  transform: scaleX(0);
  transition: transform var(--dur-2) var(--ease-out);
}
.tab.on { color: var(--green); }
.tab.on .tl { color: var(--ink); }
.tab.on::after { transform: scaleX(1); }

/* Segmented chips (Explore) */
.seg-chip.on { background: var(--saffron); color: var(--cream); border-style: solid; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-print);
  padding: var(--sp-4);
  margin: 0 var(--sp-4) var(--sp-3);
}
.card-label {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: var(--sp-2);
}
.big-value {
  font-family: var(--serif);
  font-weight: 740;
  font-size: var(--fs-display);
  color: var(--green);
  letter-spacing: -0.01em;
  line-height: var(--lh-tight);
}
.small-note { font-size: var(--fs-small); color: var(--ink-soft); }

/* ── Pills / deltas ── */
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  border-radius: 12px;
  padding: 2px 9px;
  border: 1px solid var(--rule);
}
.pill.up { color: var(--green-soft); border-color: var(--green-soft); }
.pill.down { color: var(--saffron); border-color: var(--saffron); }

/* ── List rows (ledger) ── */
.rows { margin: 0 var(--sp-4); border-top: var(--hairline); }
.row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 13px 2px;
  border: 0;
  border-bottom: var(--hairline);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-1);
}
.row:active { background: var(--sage); }
.row .r-name { flex: 1; font-size: var(--fs-base); font-weight: 500; }
.row .r-flag {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}
.row .r-val {
  font-family: var(--serif);
  font-weight: 740;
  font-size: 17.5px;
  color: var(--ink);
}
.row .r-dir { width: 18px; text-align: center; font-size: 15px; }
.dir-up { color: var(--green-soft); }
.dir-down { color: var(--saffron); }
.dir-flat { color: var(--ink-soft); }

/* ── Search ── */
.search {
  margin: var(--sp-2) var(--sp-4) var(--sp-3);
  display: flex;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-1);
  background: var(--surface);
  box-shadow: var(--shadow-print);
}
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 11px 13px;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  outline: none;
}

/* ── Horizontal strip (cross-asset) ── */
.strip {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  padding: var(--sp-1) var(--sp-4) var(--sp-4);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.strip::-webkit-scrollbar { display: none; }
.strip .s-card {
  scroll-snap-align: start;
  min-width: 138px;
  background: var(--surface);
  border: var(--hairline);
  border-left: 3px solid var(--green);
  border-radius: var(--r-1);
  padding: 10px 12px;
  box-shadow: var(--shadow-print);
}
.strip .s-name {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip .s-val {
  font-family: var(--serif);
  font-weight: 740;
  font-size: 16.5px;
  margin: 3px 0 4px;
  color: var(--ink);
}

/* ── Chat (Ask) ── */
.view-ask.on { display: flex; flex-direction: column; }
.view-ask {
  height: calc(100dvh - var(--mast-h) - var(--safe-t) - var(--tab-h) - var(--safe-b));
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
}
.msg { display: flex; animation: msgin var(--dur-2) var(--ease-out); }
.msg.u { justify-content: flex-end; }
@keyframes msgin {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}
.bubble {
  max-width: 92%;
  padding: 12px 15px;
  border-radius: var(--r-2);
  border: var(--hairline);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  overflow-wrap: anywhere;
}
.u .bubble {
  background: var(--sage);
  border-color: var(--rule-dark);
  font-style: italic;
}
.a .bubble {
  background: var(--surface);
  border-left: 3px solid var(--green);
  box-shadow: var(--shadow-print);
}
.who {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--saffron);
  margin-bottom: 5px;
}
.acards { display: flex; gap: 9px; margin-top: 11px; flex-wrap: wrap; }
.acard {
  background: rgba(28, 77, 58, 0.045);
  border: var(--hairline);
  border-left: 3px solid var(--green);
  padding: 9px 12px;
  min-width: 130px;
  flex: 1;
  border-radius: var(--r-1);
}
.acard .l {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.acard .v {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 740;
  margin: 3px 0 2px;
  color: var(--green);
}
.acard .x { font-size: 11.5px; color: var(--ink-soft); line-height: 1.4; }
.fups { margin-top: 10px; display: flex; gap: 7px; flex-wrap: wrap; }
.fups button, .chipbtn {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--saffron);
  background: transparent;
  border: 1px dashed var(--saffron);
  border-radius: 14px;
  padding: 6px 12px;
  cursor: pointer;
  text-align: left;
  transition: transform var(--dur-1) var(--ease-out);
}
.fups button:active, .chipbtn:active { transform: scale(0.95); }
.thinking {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}
.thinking::after { content: "…"; animation: dots 1.4s infinite; }
@keyframes dots {
  0% { content: "."; }
  33% { content: ".."; }
  66% { content: "..."; }
}

.composer-wrap { padding: var(--sp-2) var(--sp-4) var(--sp-3); }
.composer {
  display: flex;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  border-radius: var(--r-2);
  overflow: hidden;
  box-shadow: var(--shadow-print-strong);
}
.composer textarea {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 13px 15px;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  outline: none;
  resize: none;
  height: 50px;
  max-height: 120px;
}
.composer button {
  border: 0;
  background: var(--green);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 20px;
  cursor: pointer;
  transition: opacity var(--dur-1);
}
.composer button:disabled { opacity: 0.5; cursor: wait; }
.chat-foot {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--ink-soft);
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.chat-foot a, .chat-foot button {
  color: var(--saffron);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

/* Empty-state hero */
.hero { padding: var(--sp-5) var(--sp-2) var(--sp-3); text-align: center; }
.hero .h-mark {
  font-family: var(--serif);
  font-weight: 740;
  font-size: 34px;
  color: var(--green);
  letter-spacing: -0.02em;
}
.hero .h-line {
  font-size: var(--fs-lead);
  font-style: italic;
  color: var(--ink-soft);
  margin: 6px 0 2px;
}
.hero .h-sub {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-soft);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: var(--sp-3) 0; }

/* ── Dispatch strip ── */
.dispatch { margin: var(--sp-2) 0 0; text-align: left; }
.dispatch .d-item {
  display: block;
  padding: 10px 2px;
  border-bottom: var(--hairline);
  color: var(--ink);
  text-decoration: none;
}
.dispatch .d-item .t { font-size: 14.5px; line-height: 1.45; }
.dispatch .d-item .d {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 2px;
}

/* ── Buttons ── */
.btn {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 18px;
  border-radius: var(--r-1);
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out), background var(--dur-1), color var(--dur-1);
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--green); border-color: var(--green); color: var(--cream); }
.btn-primary:disabled { opacity: 0.55; cursor: wait; }
.btn-ghost { border-color: var(--rule); color: var(--ink-soft); }
.btn-danger { border-color: var(--saffron); color: var(--saffron); }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }
.btn-row .btn { flex: 1; }

/* ── Forms ── */
.field { margin-bottom: var(--sp-3); }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: var(--hairline);
  border-radius: var(--r-1);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  padding: 12px 13px;
  outline: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235a5142' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
.field select option { background: #fffdf6; color: #1c1a16; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 1.5px var(--green);
}
.field .hint { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--ink-soft);
  margin: var(--sp-3) 0;
}
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }

/* Steps */
.steps { display: flex; gap: 6px; margin-bottom: var(--sp-4); }
.steps .st {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--rule);
  transition: background var(--dur-2);
}
.steps .st.on { background: var(--green); }

/* Range sliders */
input[type="range"] {
  width: 100%;
  appearance: none;
  height: 3px;
  border-radius: 2px;
  background: var(--rule);
  outline: none;
  margin: 12px 0 4px;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green);
  border: 2.5px solid var(--cream);
  box-shadow: var(--shadow-print-strong);
  cursor: pointer;
}

/* ── Timeline (loan status) ── */
.timeline { margin-top: var(--sp-3); border-left: 2px solid var(--rule); padding-left: var(--sp-4); }
.tl-item { position: relative; padding-bottom: var(--sp-4); }
.tl-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sp-4) - 6.5px);
  top: 5px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--cream);
}
.tl-item .tl-s {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}
.tl-item .tl-n { font-size: 14px; margin: 2px 0; }
.tl-item .tl-d { font-family: var(--mono); font-size: 10px; color: var(--ink-soft); }

/* ── Skeletons ── */
.skel-wrap { padding: var(--sp-2) var(--sp-4); display: flex; flex-direction: column; gap: 10px; }
.skel {
  border-radius: var(--r-1);
  background: linear-gradient(100deg, var(--paper-2) 40%, var(--sage) 50%, var(--paper-2) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
}
@keyframes shimmer {
  from { background-position: 130% 0; }
  to { background-position: -30% 0; }
}

/* ── Bottom sheet ── */
.sheet-wrap { position: fixed; inset: 0; z-index: var(--z-sheet); }
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 26, 22, 0.38);
  opacity: 0;
  transition: opacity var(--dur-2);
}
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--surface);
  border: var(--hairline);
  border-bottom: 0;
  border-radius: var(--r-3) var(--r-3) 0 0;
  box-shadow: 0 -4px 24px rgba(28, 26, 22, 0.18);
  transform: translateY(105%);
  transition: transform var(--dur-3) var(--ease-spring);
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: translateY(0); }
.sheet-handle {
  width: 38px; height: 4px;
  border-radius: 2px;
  background: var(--rule);
  margin: 10px auto 2px;
  flex-shrink: 0;
}
.sheet-body {
  padding: var(--sp-3) var(--sp-5) calc(var(--sp-5) + var(--safe-b));
  overflow-y: auto;
}
.sheet-title {
  font-family: var(--serif);
  font-weight: 740;
  font-size: var(--fs-title);
  margin: var(--sp-2) 0;
}
.sheet-p { color: var(--ink-soft); font-size: 15px; }
.sheet-actions { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.sheet-actions .btn { flex: 1; }

/* Thread list inside sheet */
.thread-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: transparent;
  border: 0;
  border-bottom: var(--hairline);
  padding: 13px 2px;
  text-align: left;
  cursor: pointer;
  font-family: var(--body);
  font-size: 15px;
  color: var(--ink);
}
.thread-item:active { background: var(--sage); }
.thread-item .t-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-item .t-date { font-family: var(--mono); font-size: 10px; color: var(--ink-soft); }
.thread-item .t-del { color: var(--saffron); font-size: 15px; padding: 4px 6px; }

/* ── Toast ── */
#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-b) + 14px);
  transform: translate(-50%, 16px);
  z-index: var(--z-toast);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 12px;
  padding: 10px 16px;
  border-radius: var(--r-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2), transform var(--dur-2) var(--ease-out);
  max-width: 86vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Section headers inside views ── */
.sec-head {
  font-family: var(--mono);
  font-size: var(--fs-label);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-head::after { content: ""; flex: 1; border-top: var(--hairline); }

/* ── Utility ── */
.microcap {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--ink-soft);
}
.center { text-align: center; }
.mt2 { margin-top: var(--sp-2); }
.mt3 { margin-top: var(--sp-3); }
.mt4 { margin-top: var(--sp-4); }
.hidden { display: none !important; }

/* ── View Transitions (route changes) ── */
::view-transition-old(root) { animation: vt-out 180ms var(--ease-out) both; }
::view-transition-new(root) { animation: vt-in 220ms var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* ── Larger screens: center a phone-width column ── */
@media (min-width: 560px) {
  main, .masthead, .tabbar, .offline-banner {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    left: 0; right: 0;
  }
  .masthead, .tabbar { border-left: var(--hairline); border-right: var(--hairline); }
  body { background: var(--paper-2); }
  main { background: var(--paper); min-height: 100dvh; border-left: var(--hairline); border-right: var(--hairline); }
}

/* ============================================================
   v1.6.0 — live-data wiring: charts, registry map, trust chips
   ============================================================ */
button.s-card { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button.s-card:active { background: var(--sage); }

.chartwrap { margin: 0; }
.chartwrap svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chartwrap text { user-select: none; }

.rangechips { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.mapcard {
  background: var(--surface);
  border: var(--hairline);
  border-radius: var(--r-2);
  box-shadow: var(--shadow-print);
  overflow: hidden;
}
.mapcard svg { display: block; width: 100%; height: auto; }
.rg-dot { transition: r var(--dur-1) var(--ease-out), fill var(--dur-1) var(--ease-out); }

/* ── Index-II registry (v1.6.2) ──────────────────────────── */
.ii-quota {
  display: inline-block; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: 0.03em; color: var(--saffron);
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 20px; padding: 5px 12px;
}
.ii-quota-low { color: var(--cream); background: var(--saffron); border-color: var(--saffron); }
.ii-quota-ok { color: var(--green); border-color: var(--green-soft); }
.ii-lock {
  display: inline-block; font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.04em; color: var(--cream); background: var(--saffron);
  border-radius: 5px; padding: 3px 9px;
}
.ii-seen, .ii-gov {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; margin-left: 4px;
}
.ii-psf { font-size: 11px; color: var(--ink-soft); font-family: var(--mono); }
.ii-psf-big { font-family: var(--mono); font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.ii-band { display: inline-block; margin-top: 4px; font-size: 10px; }
.ii-deed .r-val, .ii-proj .r-val { text-align: right; }
.ii-pager { display: flex; gap: 10px; margin-top: 14px; }
.ii-pager .btn { flex: 1; }
.ii-pager .btn:disabled { opacity: 0.4; cursor: default; }
.ii-backbtn { display: inline-block; width: auto; padding: 7px 14px; font-size: 13px; }
.ii-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ii-badge {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--green);
  border: 1px solid var(--green-soft); border-radius: 4px; padding: 1px 5px; margin-left: 4px;
}
.ii-doc { display: flex; flex-direction: column; }
/* Stacked, not two-column: Index-II values range from a 7-digit barcode to a
   900+ char Devanagari recital; label above, value full-width and left-aligned
   wraps every length cleanly and never overflows the sheet. */
.ii-docrow { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.ii-docrow:last-child { border-bottom: none; }
.ii-doclabel { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.ii-doclabel-en { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.03em; text-transform: uppercase; opacity: 0.6; margin-left: 6px; }
.ii-docval { font-size: 14px; color: var(--ink); line-height: 1.5; word-break: break-word; overflow-wrap: anywhere; }
/* place-basis labels (name_basis = locality | micro_market): a place, not a building */
.ii-place { color: var(--ink-soft); font-weight: 400; }
.ii-place-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; margin-left: 5px; }
/* registry clustering: parent row + nested phases; deed-list market subheaders */
.rg-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--saffron); border: 1px solid var(--rule); border-radius: 4px; padding: 1px 5px; margin-left: 5px; }
.rg-nested { border-left: 2px solid var(--rule); margin-left: 4px; }
.rg-nested.hidden { display: none; }
.ii-mkthead { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--saffron); padding: 10px 0 4px; }
