/* The Closing Table: sale articles, roundups and hubs. Builds on site.css and pages.css.
   Pages are generated by scripts/market (npm run market:run); do not edit them by hand. */

.crumbs { font-size: var(--step--1); color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: inherit; }
.note { color: var(--muted); font-size: var(--step--1); }

.ct-kicker {
  margin: 0 0 0.6rem; font-size: var(--step--1); font-weight: 650; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green);
}
.ct-head h1 { max-width: 24ch; font-size: var(--step-3); }
@media (min-width: 900px) { .ct-head h1 { font-size: clamp(2.25rem, 1.5rem + 2vw, 3rem); } }
.ct-head { padding-bottom: clamp(1.25rem, 3vw, 2rem); }
.ct-body { padding-top: 0; }

/* Article on the left, the sale's net sheets on the right; one column on small screens. */
.ct-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: start; }
@media (min-width: 1000px) {
  .ct-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 3.5rem); }
  .ct-aside { padding-right: 12px; }
}

.ct-figure { margin: 0 0 1.5rem; }
.ct-figure img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--green-soft); }
.ct-figure figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.8rem; }

.ct-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1.75rem; }
.ct-facts > div { padding: 0.9rem 1rem 0.9rem 0; border-left: 0; }
.ct-facts > div + div { border-left: 0; padding-left: 0; }
.ct-facts > div:nth-child(n + 4) { border-top: 1px solid var(--rule); }
@media (max-width: 520px) {
  .ct-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ct-facts > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}

.ct-prose p { color: var(--ink-2); max-width: 64ch; }
.ct-prose h2 { font-size: var(--step-2); margin: 2rem 0 0.75rem; }
.ct-prose .cluster { margin-top: 1.25rem; }
.ct-source { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rule); max-width: 64ch; }

/* Seller / buyer switch: two radios and the sheet that matches the checked one. No script. */
.ct-aside-title { font-size: var(--step-1); margin: 0 0 0.9rem; }
.ct-sheets { border: 0; margin: 0; padding: 0; min-width: 0; }
.ct-radio { position: absolute; opacity: 0; pointer-events: none; }
.ct-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 1.1rem;
  background: var(--green-soft); border-radius: 999px;
}
.ct-toggle label {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin: 0;
  border-radius: 999px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  transition: background-color 160ms ease-out, color 160ms ease-out;
}
.ct-toggle label:hover { color: var(--ink); }
#ct-seller:checked ~ .ct-toggle label[for="ct-seller"],
#ct-buyer:checked ~ .ct-toggle label[for="ct-buyer"] { background: var(--green); color: #fff; }
#ct-seller:focus-visible ~ .ct-toggle label[for="ct-seller"],
#ct-buyer:focus-visible ~ .ct-toggle label[for="ct-buyer"] { outline: 3px solid var(--highlight); outline-offset: 2px; }
#ct-seller:checked ~ .ct-sheet-buyer,
#ct-buyer:checked ~ .ct-sheet-seller { display: none; }
@media (prefers-reduced-motion: reduce) { .ct-toggle label { transition: none; } }

.ct-sheet .sheet-head { padding: 1rem 1.25rem 0.85rem; }
.ct-sheet .sheet-body { padding: 0.35rem 1.25rem 1.1rem; }
.ct-sheet .ledger { font-size: 0.95rem; }
.ct-sheet .ledger td { padding: 0.45rem 0; }
.ct-sheet .ledger .ct-group td { padding-top: 0.9rem; border-bottom: 0; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.72rem; }
.ct-sheet .ledger .ct-add td:last-child::before { content: "+\00a0"; color: var(--muted); }
.ct-sheet .ledger .ct-subtotal td { border-top: 1px solid var(--ink); border-bottom: 0; font-weight: 600; padding-top: 0.6rem; }
.ct-sheet .ledger tbody .ct-subtotal td { border-top: 1px solid var(--rule-strong); border-bottom: 1px dashed var(--rule); }

.ct-assumptions { margin-top: 1.5rem; color: var(--muted); font-size: var(--step--1); }
.ct-assumptions summary { cursor: pointer; font-weight: 600; color: var(--ink-2); min-height: 44px; display: flex; align-items: center; }
.ct-assumptions ul { margin: 0.25rem 0 0; padding-left: 1.1rem; }
.ct-assumptions li + li { margin-top: 0.35rem; }

/* Hubs and roundups */
.ct-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.75rem; padding: 0; margin: 0; list-style: none; }
.ct-card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; position: relative; }
.ct-card img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; background: var(--green-soft); }
.ct-card-credit { display: none; }
.ct-card-listing .ct-card-credit { display: block; position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.15rem 0.45rem; border-radius: var(--radius-sm); background: rgba(20, 30, 25, 0.72); color: #fff; font-size: 0.7rem; }
.ct-card-body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; }
.ct-card-kicker { margin: 0; font-size: 0.78rem; font-weight: 650; letter-spacing: 0.07em; text-transform: uppercase; color: var(--green); }
.ct-card h3 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.ct-card h3 a { color: var(--ink); text-decoration: none; }
.ct-card h3 a::after { content: ""; position: absolute; inset: 0; }
.ct-card:hover { border-color: var(--rule-strong); }
.ct-card:hover h3 a { text-decoration: underline; }
.ct-card:focus-within { outline: 3px solid var(--highlight); outline-offset: 2px; }
.ct-card-meta { margin: 0; color: var(--muted); font-size: var(--step--1); }
.ct-list { padding: 0; margin: 0; list-style: none; }
.ct-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
.ct-list li:first-child { border-top: 1px solid var(--rule); }
.ct-rank { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ct-rank th, .ct-rank td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.ct-rank thead th { font-weight: 650; background: #f7faf8; border-bottom: 1px solid var(--rule-strong); }
.ct-rank tbody tr:last-child > * { border-bottom: 0; }
.ct-rank .num { text-align: right; white-space: nowrap; }
.ct-rank small { display: block; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 640px) { .ct-rank th, .ct-rank td { padding: 0.6rem; font-size: 0.9rem; } }

/* The sheet's letterhead: NetSheet.org mark and the date, as on the calculator's sheets. */
.ct-sheet .ct-sheet-head { display: block; }
.ct-sheet-brand { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.85rem; }
.ct-sheet-mark { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; color: var(--ink); }
.ct-sheet-mark svg { width: 24px; height: 24px; flex: none; }
.ct-sheet-mark .tld { color: var(--muted); font-weight: 500; }
.ct-sheet-date { color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.ct-sheet-foot { margin: 1rem 0 0; padding-top: 0.8rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; justify-content: space-between; }
.ct-sheet-foot a { color: var(--green); font-weight: 600; }

/* The Closing Table block on the home page */
.ct-home-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 1.75rem; }
.ct-home-head h2 { margin: 0; }
.ct-home-head p { margin: 0.5rem 0 0; color: var(--ink-2); max-width: 52ch; }

/* Photo viewer: one large picture and a row of the others (aerial, street view, listing photos). */
.ct-media-main { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: #1b2420; cursor: zoom-in; }
.ct-media-main img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; border: 0; border-radius: 0; background: transparent; }
.ct-media-thumbs { display: flex; gap: 6px; margin: 6px 0 0; padding: 0 0 4px; list-style: none; overflow-x: auto; scrollbar-width: thin; }
.ct-media-thumbs li { flex: 0 0 auto; }
.ct-media-thumbs a { display: block; width: 96px; border-radius: var(--radius-sm); overflow: hidden; outline-offset: 2px; opacity: 0.75; border: 2px solid transparent; }
.ct-media-thumbs a:hover, .ct-media-thumbs a[aria-current="true"] { opacity: 1; border-color: var(--green); }
.ct-media-thumbs img { display: block; width: 100%; height: 64px; object-fit: cover; border: 0; border-radius: 0; }
@media (min-width: 700px) { .ct-media-thumbs a { width: 120px; } .ct-media-thumbs img { height: 80px; } }

/* Full screen */
.ct-lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 14, 12, 0.94); color: #fff; }
.ct-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.ct-lightbox::backdrop { background: rgba(10, 14, 12, 0.94); }
.ct-lb-img { max-width: calc(100vw - 7rem); max-height: calc(100vh - 6rem); object-fit: contain; }
.ct-lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 2rem; line-height: 1; width: 3rem; height: 3rem; border-radius: 50%; cursor: pointer; }
.ct-lightbox button:hover, .ct-lightbox button:focus-visible { background: rgba(255, 255, 255, 0.25); }
.ct-lb-close { top: 1rem; right: 1rem; }
.ct-lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.ct-lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.ct-lb-caption { position: absolute; left: 0; right: 0; bottom: 0.75rem; margin: 0; padding: 0 4rem; text-align: center; font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); }
.ct-lb-count { font-weight: 650; color: #fff; margin-right: 0.5rem; }
@media (max-width: 600px) { .ct-lb-img { max-width: 100vw; } .ct-lb-prev, .ct-lb-next { top: auto; bottom: 3rem; transform: none; } }
