/* Estimate page: a deck of section cards, finished ones folded into chips, and a running ledger beside it. */
.desk { padding: 36px 0 72px; }
@media (min-width: 960px) { .desk { padding: 56px 0 96px; } }
.desk-intro { max-width: 46rem; margin-bottom: 28px; }
.desk-intro h1 { font-size: clamp(2.1rem, 3vw + 1rem, 3.4rem); margin-bottom: 12px; }
.desk-intro .lede { font-size: 1.08rem; margin-bottom: 10px; }
.kept { font-size: .95rem; color: var(--ink-soft); margin: 0; }

.desk-grid { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) {
  .desk-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 40px; }
  .desk-grid.is-finished { grid-template-columns: minmax(0, 1fr); }
  .ledger { position: sticky; top: 92px; }
}
.desk-main { min-width: 0; }

/* folded chips */
.folded { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.folded:empty { display: none; }
.folded li { max-width: 100%; min-width: 0; }
.fold-chip {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 44px; padding: 8px 16px 8px 10px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font: 500 .94rem/1.2 var(--sans); cursor: pointer; white-space: nowrap;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.fold-chip:hover { transform: translateY(-2px); box-shadow: var(--lift); border-color: var(--thread); }
.fold-chip::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 5px;
  background: linear-gradient(90deg, var(--indigo) 0 33%, transparent 33% 66%, var(--indigo) 66%), linear-gradient(0deg, var(--thread) 0 33%, transparent 33% 66%, var(--thread) 66%);
}
.fold-name { font-weight: 700; flex: none; }
.fold-sum { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* the deck */
.deck-card { position: relative; z-index: 2; background: var(--sheet); border: 1px solid var(--rule); border-radius: 20px; padding: 22px 18px; box-shadow: var(--lift); }
@media (min-width: 720px) { .deck-card { padding: 32px; } }
.card-count { margin: 0 0 4px; color: var(--ink-soft); font-size: .92rem; font-weight: 600; }
.card h2 { font-size: clamp(1.6rem, 1.4vw + 1.1rem, 2.1rem); margin-bottom: 22px; }
.card h2:focus { outline: none; }
.card h2:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.card-hint { margin: -12px 0 18px; }
.card-foot { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 18px; margin-top: 6px; border-top: 1px solid var(--rule); }
.card-foot #goOn, .card-foot #sendIt { margin-left: auto; }
.form-err { margin: 12px 0 0; }
@media (max-width: 400px) { .card-foot #sendIt { margin-left: 0; width: 100%; } }

.edge-slivers { display: grid; }
.edge-slivers span { display: block; height: 10px; background: var(--sheet); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 16px 16px; box-shadow: 0 6px 14px -10px rgba(20, 26, 46, .4); }
.edge-slivers span:nth-child(1) { margin: 0 12px; }
.edge-slivers span:nth-child(2) { margin: 0 24px; opacity: .9; }
.edge-slivers span:nth-child(3) { margin: 0 36px; opacity: .8; }
.edge-slivers span:nth-child(4) { margin: 0 48px; opacity: .7; }
.edge-slivers span:nth-child(5) { margin: 0 60px; opacity: .6; }
.edge-note { margin: 14px 0 0; color: var(--ink-soft); font-size: .95rem; }
.edge-note:empty { display: none; }

/* option tags */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  min-height: 42px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--thread); background: var(--field); color: var(--ink);
  font: 500 .95rem/1.2 var(--sans); cursor: pointer; white-space: nowrap; max-width: 100%;
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease;
}
.tag:hover { transform: translateY(-2px); border-color: var(--indigo); }
.tag[aria-pressed="true"] { background: var(--indigo); border-color: var(--indigo); color: var(--on-indigo); }
[aria-invalid="true"] .tags .tag { border-color: var(--madder); }

/* share sliders */
.shares { display: grid; gap: 4px; margin-top: 8px; }
.shares:empty { display: none; }
.share-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--wash); }
.share-row label { font-size: .95rem; font-weight: 500; }
.share-row output { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: right; }
.share-row input { grid-column: 1 / -1; width: 100%; margin: 4px 0; accent-color: var(--indigo); height: 28px; }
@media (min-width: 720px) {
  .share-row { grid-template-columns: 11rem 1fr 3.4rem; }
  .share-row input { grid-column: auto; grid-row: 1; grid-column-start: 2; }
  .share-row output { grid-column-start: 3; grid-row: 1; }
}

/* ledger (live estimate) */
.ledger { background: var(--sheet); border: 1px solid var(--rule); border-radius: 20px; padding: 22px 18px; }
@media (min-width: 720px) { .ledger { padding: 28px; } }
.ledger-label { margin: 0; color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.ledger-range { font-family: var(--serif); font-size: clamp(1.55rem, 1.2vw + 1.1rem, 2rem); line-height: 1.2; color: var(--indigo); margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.ledger-range.is-empty { color: var(--ink-soft); font-size: 1.25rem; }
.ledger-basis { color: var(--ink-soft); font-size: .95rem; }
.ledger h3 { margin: 22px 0 12px; padding-top: 18px; border-top: 1px solid var(--rule); }
.quiet { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.levers { margin: 0; padding-left: 1.1em; font-size: .97rem; }
.levers li { margin-bottom: 8px; }
.levers li.quiet { list-style: none; margin-left: -1.1em; }
.ledger-fine { margin: 20px 0 0; font-size: .88rem; color: var(--ink-soft); }

/* phone pocket bar */
.pocket { display: none; }
@media (max-width: 959px) {
  body.on-desk { padding-bottom: 64px; }
  .pocket {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; justify-content: space-between; align-items: center; gap: 12px;
    padding: 12px var(--gutter); background: var(--indigo); color: var(--on-indigo); font-size: .95rem;
  }
  .pocket strong { font-family: var(--serif); font-weight: 400; font-size: 1.08rem; white-space: nowrap; }
  .pocket.is-off { display: none; }
}

/* outcome */
.outcome:focus { outline: none; }
.outcome h2 { font-size: clamp(1.7rem, 1.6vw + 1.1rem, 2.4rem); margin-bottom: 8px; }
.out-range { font-family: var(--serif); font-size: clamp(2rem, 3vw + 1rem, 3.2rem); color: var(--indigo); line-height: 1.15; margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.out-basis { color: var(--ink-soft); max-width: 46rem; }
.outcome .notice { margin: 0 0 18px; padding: 12px 16px; border-radius: 12px; background: var(--wash); }
.outcome .notice.is-bad { color: var(--madder); }
.out-actions { margin-bottom: 8px; }
.out-tally { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--rule); max-width: 44rem; }
.out-tally h3, .answers-title { margin-bottom: 14px; }
.answers-title { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--rule); }
.answers { width: 100%; border-collapse: collapse; font-size: .97rem; }
.answers th, .answers td { text-align: left; vertical-align: top; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.answers th { font-weight: 600; width: 40%; padding-right: 16px; color: var(--ink-soft); }
.answers td { overflow-wrap: anywhere; }

@media print {
  .print-hide, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; padding: 0 !important; }
  .desk { padding: 0; }
  .desk-grid { display: block; }
  .sheet-card, .outcome { box-shadow: none; border: 0; padding: 0; background: #fff; }
  .out-range { color: #000; }
  .answers th, .answers td { border-color: #bbb; }
  .tally-lane { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
