/* List a DAO: the listing form, the live test of each answer, the fee, and managing and handing over one's listings. Every colour is a role of theme.css.
   The pieces of a form that New proposal shares (the numbered step, the note, the facts, the field) are styled in parts.css. */

/* One column that stacks: the steps, the rail, then the person's listings. From 1200 pixels (the page area is then 896 wide: room for the steps and the rail)
   the rail takes a column of its own beside the steps AND the listings, so its sticky box stays on the screen as far as the listings end. */
.ld-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; }
.ld-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ld-aside, .ld-mine { min-width: 0; }
.ld-tiles { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); }
.ld-tiles .kpi .v { font-size: 20px; }
.ld-tiles .kpi .k > span:first-child { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.ld-num { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border-radius: 999px; background: var(--sel); color: var(--acct); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.ld-hide { display: none; }


.ld-region { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ld-region:empty { display: none; }
.ld-box { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ld-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ld-box > .ld-pair { grid-template-columns: minmax(0, 1fr) minmax(0, 150px); }
.ld-select { user-select: all; }

.ld-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }


.ld-names { display: flex; flex-direction: column; gap: 8px; }
.ld-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 10px 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); }
.ld-name:hover { background: var(--hov); }
.ld-name.on { background: var(--sel); border-color: var(--line2); }
.ld-name.on .ic { color: var(--acct); }
.ld-pick { flex: 1 1 260px; display: flex; align-items: center; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ld-pick .two { flex: 1; }
.ld-held { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.ld-main .fm-status { display: inline-flex; align-items: center; gap: 5px; }

.ld-address { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 12px; border: 1px dashed var(--line2); border-radius: 8px; background: var(--head); min-width: 0; }
.ld-address:empty { display: none; }
.ld-big { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }

.ld-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.ld-choice { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; padding: 12px; border: 1px solid var(--line2); border-radius: 10px; background: var(--panel); min-width: 0; }
.ld-choice:hover { background: var(--hov); }
.ld-choice.on { border: 2px solid var(--acc); background: var(--sel); padding: 11px; }
.ld-price { overflow-wrap: anywhere; }
.ld-price.refused { color: var(--bad); font-weight: 500; }
.ld-price.wait, .ld-price.ceiling { color: var(--dim); font-weight: 500; }
.ld-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ld-fee { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px dashed var(--line2); border-radius: 8px; background: var(--head); min-width: 0; overflow-wrap: anywhere; }
.ld-feeline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ld-feeline .ld-big { font-size: 17px; }

.ld-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.ld-badges { list-style: none; padding: 0; gap: 8px; }
.ld-badges li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.ld-badges .bd { justify-self: start; }
.ld-test.refused { color: var(--bad); }
.ld-pin { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ld-custom { display: flex; flex-direction: column; gap: 10px; }

.ld-rail .card-b { gap: 12px; }
.ld-panel, .ld-plan { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ld-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: ld-step; }
.ld-steps li { counter-increment: ld-step; position: relative; display: flex; flex-direction: column; padding-left: 34px; min-width: 0; overflow-wrap: anywhere; }
.ld-steps li::before { content: counter(ld-step); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 999px; background: var(--sel); color: var(--acct); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.ld-rows { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ld-row { display: flex; justify-content: space-between; gap: 12px; }
.ld-row dt, .ld-row dd { margin: 0; }
.ld-row dd { font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.ld-panel .btn.wide { width: 100%; min-height: 40px; }

.ld-listing { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.ld-listing .row { justify-content: space-between; }
.ld-listing .mono, .ld-rail .mono, .ld-panel .mono, .ld-fee .mono, .ld-address .mono { overflow-wrap: anywhere; }
.ld-flow { display: flex; flex-direction: column; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); min-width: 0; }
.ld-mine .card-b { gap: 12px; }

@media (min-width: 1200px) {
  .ld-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 360px); }
  .ld-main { grid-column: 1; grid-row: 1; }
  .ld-mine { grid-column: 1; grid-row: 2; }
  .ld-aside { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; }
  .ld-sticky { position: sticky; top: 72px; }
}
@media (max-width: 599px) {
  .ld-pair, .ld-box > .ld-pair { grid-template-columns: minmax(0, 1fr); }
  .ld-badges li { grid-template-columns: minmax(0, 1fr); }
  .ld-name .ld-held { padding-left: 42px; }
  .ld-panel .btn, .ld-listing .btn { min-height: 44px; }
  .ld-listing .btn.sm { min-height: 44px; }
}
