/* Appraiser System — premium estate house style.
   Bone paper, ink, and a single brass accent. Serif for anything that carries
   authority (the wordmark, headings, money); sans for the working interface.
   Hairlines instead of shadows, square-ish corners instead of pills. */

/* The house palette: deep evergreen for authority, champagne gold for the
   single accent, limestone paper for the canvas. One accent, used sparingly —
   the discipline is the brand. */
:root {
  --paper: #f6f4ef;
  --panel: #ffffff;
  --panel-2: #f1eee7;

  --ink: #13251f;
  --ink-2: #47554e;
  --ink-3: #7d877f;
  --ink-4: #a7aea6;

  --rule: #e5e1d6;
  --rule-2: #d1ccbe;

  --brass: #a5813e;
  --brass-dark: #83662c;
  --brass-soft: #f4edda;

  --forest: #1f5c40;
  --forest-soft: #e4efe7;
  --claret: #93362b;
  --claret-soft: #f6e9e5;
  --amber: #8a6516;
  --amber-soft: #f7efd6;
  --slate: #2b4a63;
  --slate-soft: #e8eef4;

  --display: "Fraunces", ui-serif, "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --r: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--brass-dark); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.18; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

/* Uppercase micro-type: the workhorse of the whole look. */
.eyebrow, .k, th, .me-role, .nav a, .btn, .badge, .stat .k, .tile .k, .value-main .label {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .11em;
}

/* ------------------------------------------------------------------ chrome */
.topbar { background: var(--ink); color: #f4f0e8; }
.topbar-in {
  max-width: 1220px; margin: 0 auto; padding: 0 28px;
  display: flex; align-items: center; gap: 30px; height: 66px;
}
.brand { color: #f4f0e8; display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark {
  width: 30px; height: 30px; border: 1px solid rgba(165,129,62,.75); color: #cfa95c;
  display: grid; place-items: center; font-family: var(--display);
  font-size: 15px; letter-spacing: 0; flex-shrink: 0; border-radius: 2px;
}
.brand-word { font-family: var(--display); font-size: 17px; letter-spacing: .06em; }
.brand-word small {
  display: block; font-family: var(--sans); font-size: 8.5px; letter-spacing: .26em;
  text-transform: uppercase; color: #93a398; margin-top: 1px;
}

.nav { display: flex; gap: 26px; flex: 1; flex-wrap: wrap; }
.nav a {
  color: #9caba0; font-size: 11px; font-weight: 500; padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.on { color: #fff; border-bottom-color: var(--brass); }

.me { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #93a398; }
.me-name { color: #f4f0e8; font-family: var(--display); font-size: 15px; }
.me-role { font-size: 9px; border: 1px solid rgba(243,241,234,.3); padding: 3px 8px; color: #c3cdc2; }
.linkbtn { background: none; border: 0; color: #8f9d92; cursor: pointer; font: inherit; font-size: 12px; padding: 0; }
.linkbtn:hover { color: #fff; text-decoration: underline; }

.wrap { max-width: 1220px; margin: 0 auto; padding: 40px 28px 96px; }
.wrap.wide { max-width: 1460px; }

.pagehead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid var(--rule-2); flex-wrap: wrap;
}
.pagehead .eyebrow { font-size: 10px; font-weight: 700; color: var(--brass-dark); margin-bottom: 8px; }
.pagehead .sub { color: var(--ink-2); font-size: 14.5px; margin: 9px 0 0; max-width: 74ch; }
.pagehead-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------- cards */
.card { background: var(--panel); border: 1px solid var(--rule); border-radius: 6px; margin-bottom: 22px; box-shadow: 0 1px 2px rgba(19,37,31,.04); }
.card-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 16px 24px; border-bottom: 1px solid var(--rule);
}
.card-head h2 { font-size: 16px; }
.card-body { padding: 24px; }
.card.flush-table > .card-body { padding: 0; }
.card.flush-table > .card-body > table:first-child { border-top: 0; }
/* An empty state inside a flush card still needs its margins back. */
.card.flush-table > .card-body > .empty { padding: 24px; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-side { grid-template-columns: minmax(0,1fr) 372px; align-items: start; }
@media (max-width: 1000px) { .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; } }
/* A grid item is min-width:auto by default, so one wide child — a table, a map
   — stretches its whole column and pushes the page sideways. Nothing here
   should ever be wider than the column it sits in; the scrolling happens inside
   the card instead. */
.grid > *, .grid-side > *, .grid-2 > *, .grid-3 > * { min-width: 0; }
.card, .card-body { min-width: 0; }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-block; font-size: 10px; font-weight: 600; padding: 4px 10px; border: 1px solid; border-radius: 2px; white-space: nowrap; }
.badge-muted { background: var(--panel-2); color: var(--ink-3); border-color: var(--rule-2); }
.badge-info  { background: var(--slate-soft); color: var(--slate); border-color: #cddae5; }
.badge-good  { background: var(--forest-soft); color: var(--forest); border-color: #c5dbcd; }
.badge-warn  { background: var(--amber-soft); color: var(--amber); border-color: #e6d5a5; }
.badge-bad   { background: var(--claret-soft); color: var(--claret); border-color: #e8cdc7; }

/* ------------------------------------------------------------------ tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 9.5px; font-weight: 700; color: var(--ink-3);
  padding: 13px 20px; border-bottom: 1px solid var(--rule-2); white-space: nowrap;
}
td { padding: 15px 20px; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--panel-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.t-sub { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; }
.rowgroup td {
  background: var(--panel-2) !important; font-size: 9.5px; text-transform: uppercase;
  letter-spacing: .11em; color: var(--brass-dark); font-weight: 700; padding: 10px 20px;
}

/* ------------------------------------------------------------------- forms */
label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; letter-spacing: .01em; }
label .hint { display: block; font-weight: 400; color: var(--ink-3); font-size: 12px; margin-top: 3px; line-height: 1.45; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--rule-2); border-radius: var(--r);
  font: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--brass); outline-offset: 0; border-color: var(--brass); }
textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
.field { margin-bottom: 16px; }
.fields { display: grid; gap: 16px 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fields .full { grid-column: 1 / -1; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: var(--ink); color: #f3f1ea; border: 1px solid var(--ink);
  padding: 11px 20px; border-radius: var(--r);
  font-size: 10.5px; font-weight: 600;
}
.btn:hover { background: #0b1a15; border-color: #0b1a15; color: #fff; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--ink); color: var(--ink); }
.btn.brass { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn.brass:hover { background: var(--brass-dark); border-color: var(--brass-dark); }
.btn.small { padding: 7px 13px; font-size: 9.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.flash { padding: 14px 20px; border-radius: var(--r); margin-bottom: 22px; font-size: 14px; border: 1px solid; border-left-width: 3px; }
.flash-info { background: var(--slate-soft); border-color: #cddae5; border-left-color: var(--slate); color: var(--slate); }
.flash-good { background: var(--forest-soft); border-color: #c5dbcd; border-left-color: var(--forest); color: var(--forest); }
.flash-warn { background: var(--amber-soft); border-color: #e6d5a5; border-left-color: var(--amber); color: var(--amber); }
.flash-bad  { background: var(--claret-soft); border-color: #e8cdc7; border-left-color: var(--claret); color: var(--claret); }

.empty { color: var(--ink-3); font-size: 14px; font-style: italic; font-family: var(--display); }

/* --------------------------------------------------------------- valuation */
.value-hero { display: flex; gap: 48px; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }
.value-main .label { font-size: 9.5px; font-weight: 700; color: var(--ink-3); }
.value-main .amount {
  font-family: var(--display); font-size: 52px; line-height: 1.05; font-weight: 600;
  letter-spacing: -0.025em; font-variant-numeric: tabular-nums; margin: 8px 0 6px;
}
.value-range { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.value-side { display: flex; gap: 36px; flex-wrap: wrap; padding-bottom: 6px; }
.stat .k { font-size: 9.5px; font-weight: 700; color: var(--ink-3); }
.stat .v { font-family: var(--display); font-size: 21px; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 4px; }

.confbar { height: 3px; background: var(--rule); overflow: hidden; min-width: 96px; margin-top: 7px; }
.confbar-fill { height: 100%; }
.confbar-good { background: var(--forest); }
.confbar-warn { background: var(--brass); }
.confbar-bad  { background: var(--claret); }

.adj-pos { color: var(--forest); font-variant-numeric: tabular-nums; }
.adj-neg { color: var(--claret); font-variant-numeric: tabular-nums; }
.adj-zero { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.unanswered td { background: #fdfaf1; }

/* A cost line that is the sum of other lines shows its working in place, rather
   than arriving as a lump somebody added up off-page. */
.cost-parts { margin-top: 7px; }
.cost-parts summary { cursor: pointer; font-size: 11.5px; color: var(--slate); list-style: none; }
.cost-parts summary::-webkit-details-marker { display: none; }
.cost-parts summary::before { content: '\25b8\00a0'; }
.cost-parts[open] summary::before { content: '\25be\00a0'; }
.cost-parts table { width: auto; margin: 8px 0 2px; font-size: 12px; }
.cost-parts td { padding: 3px 16px 3px 0; border: 0; }
.cost-parts .c { color: var(--brass); font-weight: 600; font-size: 10.5px; letter-spacing: .06em; }
tr.section td {
  background: var(--panel-2); font-size: 10px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-3);
}
tr.section td span { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--ink-3); }
tr.sunk td { background: #fbf8f6; }
tr.sunk.provided td { color: var(--ink-3); }

.bridge { display: grid; }
.bridge-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline;
  font-size: 13.5px; padding: 9px 0; border-bottom: 1px solid var(--rule);
}
.bridge-row:last-child { border-bottom: 0; }
.bridge-row.total { font-weight: 650; border-top: 1px solid var(--rule-2); border-bottom: 0; padding-top: 11px; }
.bridge-row.total strong { font-family: var(--display); font-size: 15px; }

/* -------------------------------------------------------------------- RFIs */
.rfi { border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: 14px; }
.rfi.open { border-left: 2px solid var(--brass); }
.rfi.answered { border-left: 2px solid var(--slate); }
.rfi.resolved { border-left: 2px solid var(--forest); opacity: .8; }
.rfi.waived { border-left: 2px solid var(--ink-4); opacity: .62; }
.rfi-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; padding: 16px 20px; }
.rfi-q { font-family: var(--display); font-size: 16px; line-height: 1.4; }
.rfi-why { color: var(--ink-2); font-size: 13.5px; margin-top: 7px; line-height: 1.55; }
.rfi-meta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.rfi-impact {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: #fff; background: var(--brass); padding: 4px 9px; white-space: nowrap;
}
.rfi-body { padding: 16px 20px; border-top: 1px solid var(--rule); background: var(--panel-2); }
.rfi-answer { font-size: 13.5px; padding: 12px 15px; background: #fff; border: 1px solid var(--rule); border-radius: var(--r); margin-bottom: 10px; }
.docsrc { margin-top: 12px; border-left: 2px solid var(--brass); padding-left: 14px; }
.docsrc-row + .docsrc-row { margin-top: 12px; }
.docsrc-name { font-family: var(--display); font-size: 14.5px; margin-bottom: 5px; }
.docsrc-kv { display: grid; grid-template-columns: 82px 1fr; gap: 3px 12px; margin: 0; font-size: 12.5px; }
.docsrc-kv dt { color: var(--ink-3); text-transform: uppercase; letter-spacing: .07em; font-size: 9.5px; padding-top: 3px; }
.docsrc-kv dd { margin: 0; color: var(--ink-2); }
@media (max-width: 620px) { .docsrc-kv { grid-template-columns: 1fr; gap: 0 0; } .docsrc-kv dd { margin-bottom: 6px; } }

.attachbar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 12px; border: 1px dashed var(--rule-2); border-radius: var(--r);
  background: #fff; margin-bottom: 10px;
}
.attachbar input[type=file], .attachbar select { width: auto; flex: 1 1 200px; font-size: 13px; padding: 7px 9px; }

/* Inputs line up even when one label wraps to three lines. */
.fields { align-items: end; }
.fields > .field { margin-bottom: 0; }

.rfi-answer .who { font-size: 11px; color: var(--ink-3); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .08em; }

/* -------------------------------------------------------------------- misc */
.kv { display: grid; grid-template-columns: 178px 1fr; gap: 11px 18px; font-size: 14px; }
.kv dt { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; padding-top: 2px; }
.kv dd { margin: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 3px 0; } .kv dd { margin-bottom: 12px; } }

.pills { display: flex; gap: 0; flex-wrap: wrap; border: 1px solid var(--rule-2); border-radius: var(--r); overflow: hidden; width: fit-content; }
.pill {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  padding: 9px 16px; color: var(--ink-2); background: var(--panel);
  border-right: 1px solid var(--rule-2);
}
.pill:last-child { border-right: 0; }
.pill.on { background: var(--ink); color: #f6f2ea; }
.pill:hover { text-decoration: none; background: var(--panel-2); color: var(--ink); }
.pill.on:hover { background: var(--ink); color: #fff; }

.doc { display: flex; gap: 15px; align-items: flex-start; padding: 15px 0; border-bottom: 1px solid var(--rule); }
.doc:first-child { padding-top: 0; }
.doc:last-child { border-bottom: 0; }
.doc-icon {
  width: 38px; height: 38px; border: 1px solid var(--rule-2); background: var(--panel-2);
  display: grid; place-items: center; font-size: 15px; flex-shrink: 0;
}
.doc-main { flex: 1; min-width: 0; }
.doc-name { font-size: 14.5px; font-family: var(--display); overflow: hidden; text-overflow: ellipsis; }
.doc-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

.checklist { display: grid; gap: 9px; font-size: 13.5px; }
.checklist div { display: flex; gap: 10px; align-items: baseline; }
.check-yes { color: var(--forest); }
.check-no { color: var(--claret); }
.check-opt { color: var(--ink-4); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; border: 1px solid var(--rule); background: var(--panel); border-radius: var(--r); }
.tile { padding: 22px 24px; border-right: 1px solid var(--rule); }
.tile:last-child { border-right: 0; }
@media (max-width: 820px) { .tile { border-right: 0; border-bottom: 1px solid var(--rule); } .tile:last-child { border-bottom: 0; } }
.tile .k { font-size: 9.5px; font-weight: 700; color: var(--ink-3); }
.tile .v { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -0.025em; margin: 7px 0 3px; font-variant-numeric: tabular-nums; line-height: 1; }
.tile .s { font-size: 12.5px; color: var(--ink-3); }

.narrative { font-size: 15.5px; line-height: 1.72; font-family: var(--display); color: #24231c; max-width: 78ch; }
.narrative p { margin: 0 0 15px; }
.narrative p:first-child { font-size: 17px; line-height: 1.6; color: var(--ink); }

.notelist { list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.notelist li { padding: 9px 0 9px 20px; position: relative; color: var(--ink-2); border-bottom: 1px solid var(--rule); line-height: 1.55; }
.notelist li:last-child { border-bottom: 0; }
.notelist li::before { content: ""; position: absolute; left: 0; top: 17px; width: 9px; height: 1px; background: var(--brass); }

details.raw summary, details > summary { cursor: pointer; font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .09em; font-weight: 600; }
details > summary:hover { color: var(--brass-dark); }
details.raw pre { background: var(--panel-2); padding: 14px; border: 1px solid var(--rule); overflow: auto; font-size: 12px; }

/* Correcting a name in the roster: folded away until wanted, so the table still
   reads as a roster rather than a form. */
details.rename { margin-top: 5px; }
details.rename > summary { font-size: 9.5px; letter-spacing: .11em; color: var(--ink-4); }
details.rename[open] > summary { color: var(--brass-dark); }
details.rename .rename-form { display: flex; gap: 7px; align-items: center; margin: 8px 0 5px; }
details.rename .rename-form input {
  flex: 1 1 210px; min-width: 0; padding: 7px 9px; font: inherit; font-size: 13px;
  color: var(--ink); background: var(--panel); border: 1px solid var(--rule-2); border-radius: var(--r);
}
details.rename .rename-form input:focus { outline: 0; border-color: var(--brass); }
details.rename .t-sub { max-width: 46ch; line-height: 1.5; }

fieldset.factor-group { border: 0; padding: 0; margin: 0 0 30px; }
fieldset.factor-group legend { padding: 0; }
fieldset.factor-group legend strong { font-family: var(--display); font-size: 17px; font-weight: 600; }

/* ----------------------------------------------------------------- sign in */
body.bare { display: grid; place-items: center; min-height: 100vh; background: var(--ink); }
.signin { width: 100%; max-width: 400px; background: var(--panel); border-radius: var(--r); padding: 40px; }
.signin h1 { font-size: 24px; margin-bottom: 6px; }
.signin .sub { color: var(--ink-3); font-size: 13.5px; margin-bottom: 26px; }
.signin .btn { width: 100%; justify-content: center; margin-top: 8px; }

/* Registration doors — one hairlined card per way in: the pitch in a line,
   the privacy note in the small print. */
.door { border: 1px solid var(--rule); border-radius: var(--r); padding: 16px 16px 13px; }
.door + .door { margin-top: 14px; }
.door-role { font-size: 16px; margin-bottom: 3px; }
.door-line { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.door-fine { font-size: 11px; color: var(--ink-3); margin-top: 10px; line-height: 1.5; }
.door-foot { font-size: 11.5px; color: var(--ink-3); margin-top: 18px; text-align: center; }

/* ------------------------------------------------- document-first intake */

/* A value that came off a document rather than out of the agent's head. Quiet
   enough to skim past, loud enough to notice when it is wrong. */
.prefill {
  display: inline-block; margin-left: 8px; padding: 1px 7px;
  background: var(--forest-soft); color: var(--forest);
  border: 1px solid #cfe0d5; border-radius: 2px;
  font-family: var(--sans); font-size: 9.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; vertical-align: 2px;
  cursor: help;
}
.prefill-derived { background: var(--amber-soft); color: var(--amber); border-color: #e6d5a5; }

.conflict {
  display: block; margin-top: 5px; padding: 7px 10px;
  background: var(--claret-soft); border-left: 2px solid var(--claret);
  color: var(--claret); font-size: 12px; font-weight: 400; line-height: 1.5;
  text-transform: none; letter-spacing: 0;
}
.conflict em { font-style: normal; color: var(--ink-3); }

.prereq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.prereq { border: 1px solid var(--rule); background: var(--panel-2); padding: 16px; border-radius: var(--r); }
.prereq-req { border-color: var(--rule-2); background: var(--panel); }
.prereq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.prereq-name { font-family: var(--display); font-size: 15px; line-height: 1.3; }
.prereq .docsrc-kv { margin-bottom: 14px; }
.prereq .field { margin: 0; }
.prereq input[type=file] { font-size: 12px; width: 100%; }

.readgrid { display: grid; gap: 0; }
.readrow {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--rule);
}
.readrow:last-child { border-bottom: 0; }
.readrow-doc { font-size: 13.5px; }

.btn-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.btn-discord:hover { background: #4752c4; border-color: #4752c4; }

/* A price and the unit it was quoted in, as one control. */
.priceinput { display: flex; gap: 8px; align-items: stretch; }
.priceinput input { flex: 1 1 auto; min-width: 0; }
.priceinput select { flex: 0 0 auto; width: auto; padding-right: 30px; }

/* What has to be behind an offer before the price is worth naming. */
.checklist-offer { list-style: none; display: grid; gap: 9px; font-size: 13.5px; }
.checklist-offer li { display: flex; gap: 9px; align-items: baseline; line-height: 1.5; }

/* Destructive, and looks it — deleting a lot takes its documents with it. */
.btn.ghost.danger { color: var(--bad); border-color: #e3c9c4; }
.btn.ghost.danger:hover { background: var(--claret-soft); border-color: var(--bad); color: var(--bad); }

/* ------------------------------------------------------ the lot on the map */

.plotmap { margin-top: 4px; }
.plotmap-canvas {
  width: 100%; height: 420px; border: 1px solid var(--rule-2); border-radius: var(--r);
  background: var(--panel-2);
}
.plotmap-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 10px; font-size: 12.5px;
}
.plotmap-bar label { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; }
.plotmap-bar input[type=range] { width: 180px; }
@media (max-width: 640px) { .plotmap-canvas { height: 300px; } }

/* ------------------------------------------------------------------- print */
@media print {
  .topbar, .pagehead-actions, .noprint, details { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .card { border-color: #bbb; break-inside: avoid; margin-bottom: 16px; }
  .wrap { max-width: none; padding: 0; }
  .value-main .amount { font-size: 34pt; }
  a { color: inherit; }
}

/* Choosing which lots an offer covers. */
.lotpick { display: grid; gap: 2px; }
.lotpick-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--rule); border-radius: var(--r);
  cursor: pointer; font-size: 14px; background: var(--panel);
}
.lotpick-row:hover { border-color: var(--rule-2); }
.lotpick-row input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.lotpick-off { opacity: .55; cursor: not-allowed; background: var(--panel-2); }

/* Priced title by title. A blended figure and a column of per-title figures on
   screen at once is an invitation to fill in both and mean neither, so the form
   shows only the scheme actually in use. */
.lotpick-item { display: grid; gap: 2px; }
.lotpick-price { padding: 2px 14px 12px 42px; }
.lotpick-price .field { margin: 0; }
form:not(.pricing-per-lot) .lotpick-price { display: none; }
form.pricing-per-lot .pricing-blended-only { display: none; }
.pricing-modes { display: grid; gap: 8px; margin-top: 8px; }
.pricing-mode {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--r);
  cursor: pointer; font-weight: 400;
}
.pricing-mode:hover { border-color: var(--rule-2); }
.pricing-mode input { width: auto; margin-top: 3px; flex: 0 0 auto; }
.pricing-mode .hint { display: block; margin-top: 2px; }

/* The deal as it currently stands, worked out while it is being typed. */
.pricing-summary {
  padding: 11px 14px; border: 1px solid var(--rule); border-radius: var(--r);
  background: var(--panel-2); font-size: 13px; line-height: 1.5;
}
.pricing-warn { margin-top: 6px; color: var(--claret); font-size: 12.5px; }
.lotpick-calc {
  padding: 0 14px 10px 42px; font-size: 12px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* Why a box is empty: nobody could read it, or the paper is not here yet. */
.blankwhy {
  display: block; margin-top: 5px; font-size: 11.5px; font-weight: 400;
  letter-spacing: 0; text-transform: none; line-height: 1.45;
}
.blankwhy-absent  { color: var(--ink-3); }
.blankwhy-unread  { color: var(--amber); }
.blankwhy-missing { color: var(--claret); }

/* The account an upload is filed under, as opposed to the person named on it. */
.filingas {
  display: block; margin-top: 6px; font-size: 11.5px; font-weight: 400;
  letter-spacing: 0; text-transform: none; color: var(--ink-3);
}
.filingas strong { color: var(--ink-2); font-weight: 600; }

/* Capturing corners on a phone, standing on the monument. */
.capture { text-align: center; padding: 8px 0 4px; }
.capture .btn {
  font-size: 14px; padding: 22px 34px; width: 100%; max-width: 420px;
  justify-content: center; letter-spacing: .08em;
}
.capture-status { display: block; margin-top: 14px; font-size: 13.5px; color: var(--ink-2); min-height: 20px; }
.capture-bad { color: var(--claret); }
.corner-list { display: grid; gap: 2px; margin-top: 4px; }
.corner-row {
  display: flex; align-items: baseline; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--rule); border-radius: var(--r); background: var(--panel);
  font-size: 13.5px;
}
.corner-no {
  flex: 0 0 auto; width: 26px; height: 26px; border: 1px solid var(--rule-2);
  border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700;
}

/* "or" between the two ways in. */
.signin-or { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; color: var(--ink-4); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.signin-or::before, .signin-or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }

/* ------------------------------------------------------------------ phones

   The desk view assumes a wide screen and a mouse. A facilitator standing on a
   boundary has neither, and the capture screen is useless if the rest of the
   app cannot be navigated to reach it. Everything below is about one thumb on a
   handset: bigger targets, one column, and tables that scroll instead of
   spilling off the side of the world. */

@media (max-width: 820px) {
  .wrap, .wrap.wide { padding: 22px 16px 64px; }

  /* The bar wraps to three lines on a phone. It becomes one scrollable strip. */
  .topbar-in { height: auto; padding: 10px 14px; gap: 12px; flex-wrap: wrap; }
  .brand-word { font-size: 15px; }
  .brand-word small { display: none; }
  .nav {
    order: 3; width: 100%; gap: 18px;
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: 10.5px; }
  .me { margin-left: auto; }
  .me-name { font-size: 13px; }

  .pagehead { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 22px; }
  .pagehead h1 { font-size: 23px; }
  .pagehead .sub { font-size: 14px; }
  .pagehead-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .pagehead-actions .btn, .pagehead-actions form, .pagehead-actions form .btn { width: 100%; justify-content: center; }

  /* Thumbs, not cursors. 44px is the smallest target that is reliably hit. */
  .btn { min-height: 44px; padding: 12px 18px; }
  .btn.small { min-height: 38px; padding: 9px 14px; }
  .linkbtn { min-height: 32px; }

  /* iOS zooms the whole page when a field under 16px takes focus. */
  input[type=text], input[type=email], input[type=password], input[type=number],
  input[type=date], input[type=file], select, textarea { font-size: 16px; padding: 12px; }
  .fields { grid-template-columns: 1fr; gap: 14px; }
  .field { margin-bottom: 14px; }

  .card { margin-bottom: 16px; border-radius: var(--r); }
  .card-head { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .card-head h2 { font-size: 15px; }
  .card-body { padding: 16px; }

  /* A table on a phone either scrolls or lies. These scroll, and the first
     column stays put so a row can still be identified while reading across. */
  .card-body, .card.flush-table > .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 560px; font-size: 13.5px; }
  th, td { padding: 11px 12px; }

  .grid, .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; gap: 16px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 14px; }
  .tile .v { font-size: 20px; }

  .value-hero { flex-direction: column; align-items: stretch; gap: 16px; }
  .value-main .amount { font-size: 30px; }
  .value-stats { grid-template-columns: 1fr 1fr; }

  /* The request cards are the facilitator's actual working surface. */
  .rfi-head { flex-direction: column; gap: 8px; }
  .rfi-meta { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .rfi-q { font-size: 15px; }
  .attachbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .attachbar .btn, .attachbar input, .attachbar select { width: 100%; }

  .doc { flex-wrap: wrap; }
  .doc .btnrow { width: 100%; margin-top: 8px; }
  .prereq-grid { grid-template-columns: 1fr; gap: 14px; }
  .lotpick-row { padding: 14px 12px; }
  .priceinput { flex-wrap: wrap; }
  .priceinput select { width: 100%; }

  .docsrc-kv { grid-template-columns: 1fr; gap: 2px; }
  .docsrc-kv dt { margin-top: 8px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dt { margin-top: 10px; color: var(--ink-3); }

  .plotmap-canvas { height: 320px; }
  .plotmap-bar { gap: 10px; }
  .plotmap-bar input[type=range] { width: 100%; }

  .signin { padding: 26px 20px; }
}

/* A phone held upright — the case this has to be right for, because it is how
   a facilitator holds one while standing on a boundary. */
@media (max-width: 520px) {
  .tiles { grid-template-columns: 1fr; border-radius: var(--r); overflow: hidden; }
  .tile { border-right: 0; border-bottom: 1px solid var(--rule); padding: 14px 16px; }
  .tile:last-child { border-bottom: 0; }
  .tile .v { font-size: 19px; }

  .value-stats { grid-template-columns: 1fr; }
  .pagehead-actions { grid-template-columns: 1fr; }
  .pagehead h1 { font-size: 21px; line-height: 1.22; }

  /* Narrow enough that a table has to scroll whatever we do; the point is that
     it scrolls inside its card rather than stretching the page. */
  table { min-width: 480px; font-size: 13px; }
  th { font-size: 9px; padding: 10px; }
  td { padding: 10px; }

  h1 { font-size: 22px; }
  h2 { font-size: 15px; }
  .card-body { padding: 14px; }
  .btnrow { gap: 8px; }
  .btnrow .btn { flex: 1 1 auto; justify-content: center; }

  /* The two screens that matter in the field. */
  .capture .btn { padding: 26px 20px; font-size: 15px; }
  .corner-row { padding: 12px; }
  .plotmap-canvas { height: 300px; }
}
