/* =====================================================
   Ashland Auctions — Lot (auction event) detail page
   Components come from buyer-components.css; tokens and the
   nav come from auctions-map.css. This file holds page layout
   plus the pieces the library has no component for (auction
   masthead, stat rail, terms overlay shell).
   ===================================================== */

:root {
  --navy: #14294B;
  --ok: #4CAF50;
}

/* ============ CONTAINER ============ */
/* auctions-map.css narrows main.container (50px, then 40/24/16px) for the map
   page's edge-to-edge layout, which leaves this page's <main> out of line with
   the hero, catalogue and closer bands. Put main back on the shared .container
   gutter at every breakpoint. */
main.container { padding-left: 64px; padding-right: 64px; }
@media (max-width: 1180px) { main.container { padding-left: 48px; padding-right: 48px; } }
@media (max-width: 1000px) { main.container { padding-left: 32px; padding-right: 32px; } }
@media (max-width: 720px)  { main.container { padding-left: 24px; padding-right: 24px; } }

/* ============ BREADCRUMB ============ */
.lot-breadcrumb { padding: 20px 0 0; }
.lot-breadcrumb-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}

/* ============ AUCTION MASTHEAD ============ */
.auction-masthead { padding-top: 24px; }
.masthead-panel {
  position: relative;
  border-radius: var(--r-hero);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.masthead-panel img.masthead-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
/* Same navy wash as the library's featured-auction banner. */
.masthead-panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, rgba(16,34,66,.94) 0%, rgba(16,34,66,.82) 46%, rgba(16,34,66,.4) 100%);
}
.masthead-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  padding: 40px 44px 44px;
  align-items: start;
}

.masthead-kick {
  display: flex; flex-wrap: wrap; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-weight: 700; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(255,255,255,.82);
}
.masthead-kick i { font-size: 15px; color: var(--brand); }
.masthead-kick .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.45); }

.masthead-title {
  font-family: var(--font-display);
  font-weight: 700; font-size: 46px; line-height: 1.04; letter-spacing: -.025em;
  margin-top: 12px;
}
.masthead-title em { font-style: normal; color: var(--brand); }

.masthead-sub {
  font-family: var(--font-ui);
  font-size: 14.5px; line-height: 1.7; color: rgba(255,255,255,.78);
  max-width: 620px; margin-top: 14px;
}

.masthead-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
/* c-fa-prebid carries its own top margin for the card banner. */
.masthead-badges .c-fa-prebid { margin-top: 0; }
/* Secondary facts, in the same pill geometry as c-fa-prebid but read as
   supporting text rather than the headline offer. */
.mb-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.36); color: rgba(255,255,255,.88);
  font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: .1em; text-transform: uppercase;
}
.mb-badge i { font-size: 14px; }
.mb-badge[data-terms] { cursor: pointer; }
.mb-badge[data-terms]:hover { border-color: var(--brand); color: var(--brand); }

/* Countdown card — the library's c-fa-ends block, grown to hero scale */
.masthead-clock {
  background: var(--surface-white);
  color: var(--text-primary);
  border-radius: 16px;
  padding: 20px 22px 22px;
  box-shadow: 0 24px 50px -24px rgba(0,0,0,.6);
}
.mclock-label {
  font-family: var(--font-ui);
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
}
.mclock-label .live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--ok);
  animation: pulseDot 1.5s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(.75); } }

.mclock-units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.mclock-unit { text-align: center; }
.mclock-unit b {
  display: block;
  font-family: var(--font-display); font-weight: 800; font-size: 26px; line-height: 1;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.mclock-unit span {
  display: block; margin-top: 5px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
}
.mclock-foot {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft);
  font-family: var(--font-ui); font-size: 12.5px; color: var(--text-muted);
  display: flex; align-items: center; gap: 7px;
}
.mclock-foot i { font-size: 15px; color: var(--brand-deep); }

/* ============ STAT RAIL — c-fa-cellgrid on a card, six across ============ */
.stat-rail {
  position: relative;
  /* Inset from the banner's left and right edges so the card reads as sitting
     inside the hero rather than butting against it; the hero panel itself stays
     flush with the container so it lines up with the bands below. */
  margin: -28px 28px 0;
  background: var(--surface-white);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  box-shadow: 0 20px 44px -32px rgba(0,0,0,.45);
  overflow: hidden;
}
.stat-rail-grid { grid-template-columns: repeat(6, 1fr); border-top: none; border-bottom: none; }
.stat-rail .c-fa-cell { padding: 16px 20px; }
.stat-rail .c-fa-cell .v { font-size: 15px; line-height: 1.15; white-space: nowrap; }
.stat-rail .c-fa-cell .v small {
  display: block; font-weight: 400; font-size: 11.5px; color: var(--text-muted);
  line-height: 1.3; margin-top: 2px;
}

/* ============ DETAIL LAYOUT ============ */
.lot-layout {
  display: grid;
  grid-template-columns: 68fr 32fr;
  gap: 48px;
  padding-top: 44px;
  padding-bottom: 56px;
  align-items: start;
}
.lot-left { display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.lot-right { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }

/* Stacked blocks — the tabbed breakdown lives on each lot's listing page. */
.lot-block { padding-bottom: 4px; }
.lot-block + .lot-block { border-top: 1px solid var(--line-soft); padding-top: 32px; }
/* Matches the library's panel-card heading (c-pcard-head h3). */
.lot-block-title {
  font-family: var(--font-ui); font-weight: 700; font-size: 18px;
  color: var(--text-primary); margin-bottom: 16px;
}
.lot-body-text {
  font-family: var(--font-display); font-size: 14px; line-height: 1.7; color: var(--text-body);
}
.lot-body-text + .lot-body-text { margin-top: 14px; }

/* ============ DESCRIPTION (admin rich text) ============
   Body copy follows the library's document body (c-doc-sec p): Inter 14px/1.7.
   Whatever the editor emits — paragraphs, headings, lists, emphasis, links —
   has a style here so the rendered description never falls back to UA defaults. */
.lot-desc { font-family: var(--font-display); font-size: 14px; line-height: 1.7; color: var(--text-body); }
.lot-desc > *:first-child { margin-top: 0; }
.lot-desc > *:last-child { margin-bottom: 0; }
.lot-desc p { margin: 0 0 14px; }
.lot-desc h3, .lot-desc h4, .lot-desc h5 {
  font-family: var(--font-ui); font-weight: 700; color: var(--text-primary);
  margin: 24px 0 10px;
}
.lot-desc h3 { font-size: 17px; }
.lot-desc h4 { font-size: 16px; }
.lot-desc h5 { font-size: 14.5px; }
.lot-desc strong, .lot-desc b { color: var(--text-primary); font-weight: 600; }
.lot-desc em, .lot-desc i { font-style: italic; }
.lot-desc a { color: var(--brand-deep); text-decoration: underline; text-underline-offset: 2px; }
.lot-desc a:hover { color: var(--text-primary); }
.lot-desc ul, .lot-desc ol { margin: 0 0 14px; padding: 0; list-style: none; }
.lot-desc li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.lot-desc li:last-child { margin-bottom: 0; }
/* Brand bullet, matching the terms list. */
.lot-desc ul > li::before {
  content: ""; position: absolute; left: 8px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}
.lot-desc ol { counter-reset: desc; }
.lot-desc ol > li { counter-increment: desc; }
.lot-desc ol > li::before {
  content: counter(desc) "."; position: absolute; left: 4px; top: 0;
  font-family: var(--font-ui); font-weight: 700; font-size: 13px; color: var(--brand-deep);
}
.lot-desc blockquote {
  margin: 0 0 14px; padding: 12px 18px;
  background: var(--bg); border-left: 3px solid var(--brand); border-radius: 0 10px 10px 0;
}
.lot-desc hr { border: none; border-top: 1px solid var(--line-soft); margin: 20px 0; }
.lot-desc table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 13.5px; }
.lot-desc th, .lot-desc td { border: 1px solid var(--line-soft); padding: 8px 12px; text-align: left; }
.lot-desc th { font-family: var(--font-ui); font-weight: 600; color: var(--text-primary); background: var(--bg); }
.lot-desc img { max-width: 100%; height: auto; border-radius: 12px; }

/* Collapsed state — a long description is cut at a fixed height and faded out
   so the fold reads as deliberate rather than as the page ending. */
.lot-desc.is-clamped {
  max-height: 320px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 220px, transparent 320px);
          mask-image: linear-gradient(to bottom, #000 220px, transparent 320px);
}
.lot-desc-toggle {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 14px;
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--brand-deep);
}
.lot-desc-toggle:hover { color: var(--text-primary); }
.lot-desc-toggle i { font-size: 16px; transition: transform .2s; }
.lot-desc-toggle[aria-expanded="true"] i { transform: rotate(180deg); }


/* ============ RIGHT RAIL ============ */
/* c-register (the library's in-panel button) is a 14px-radius block, so every
   button in this panel follows that, not the 999px page pill. */
.rail-secondary,
.auctioneer-actions .c-btn {
  border-radius: 14px; border: 1.5px solid var(--line);
  background: #fff; color: var(--text-primary); box-shadow: none;
}
.rail-secondary { width: 100%; padding: 14px 20px; font-size: 14px; }
.rail-secondary:hover,
.auctioneer-actions .c-btn:hover { border-color: var(--text-primary); background: var(--surface-light); }
.c-register:hover { background: var(--brand-deep); }

/* Terms opener — same 14px block, laid out as a labelled row. */
.rail-terms {
  display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; text-align: left;
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px 16px;
  transition: border-color .2s, background .2s;
}
.rail-terms:hover { border-color: var(--text-primary); background: var(--surface-light); }
.rail-terms > i:first-child { font-size: 19px; color: var(--brand-deep); flex-shrink: 0; }
.rail-terms > i:last-child { margin-left: auto; font-size: 17px; color: var(--text-muted); flex-shrink: 0; }
.rail-terms .rt-name {
  display: block; font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--text-primary);
}
.rail-terms .rt-meta {
  display: block; font-family: var(--font-ui); font-size: 11.5px; color: var(--text-muted); margin-top: 2px;
}

/* Auction-desk block, divided off from the actions below it. */
.rail-section {
  border-bottom: 1px solid var(--line-soft); padding-bottom: 18px; margin-bottom: 2px;
  display: flex; flex-direction: column; gap: 14px;
}
.rail-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.rail-section-title {
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted);
}
.rail-section-phone {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  font-family: var(--font-ui); font-size: 14px; font-weight: 700; color: var(--text-primary);
}
.rail-section-phone:hover { color: var(--brand-deep); }
.rail-section-phone i { font-size: 15px; color: var(--brand-deep); }

.auctioneer { display: flex; align-items: center; gap: 13px; }
/* Stand-in for a missing auctioneer portrait: a brand-marked disc with a slow
   breathing ring, so the slot reads as intentional rather than as a broken image. */
.auctioneer-avatar {
  position: relative; width: 48px; height: 48px; flex-shrink: 0;
  border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #1c1c1c; font-size: 22px;
}
.auctioneer-avatar::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--brand);
  animation: avatarPulse 2.6s ease-in-out infinite;
}
@keyframes avatarPulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50%      { opacity: 0;   transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .auctioneer-avatar::after { animation: none; opacity: .4; }
}
.auctioneer-name { font-family: var(--font-ui); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.auctioneer-role { font-family: var(--font-ui); font-size: 13px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }
.auctioneer-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auctioneer-actions .c-btn { text-decoration: none; padding: 12px 16px; font-size: 13.5px; }

/* ============ LOTS SECTION ============ */
.lots-section { border-top: 1.5px solid var(--line); padding: 48px 0 72px; }
.lots-head { flex-wrap: wrap; }
.lots-head .c-sortby strong { color: var(--text-primary); font-weight: 600; }

.lots-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line-soft);
}
/* Native select in the c-filterbtn pill. */
.lots-select {
  position: relative; display: inline-flex; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
}
.lots-select select {
  appearance: none; -webkit-appearance: none;
  border: none; outline: none; background: transparent; cursor: pointer;
  font-family: var(--font-ui); font-size: 13.5px; font-weight: 600; color: var(--text-primary);
  padding: 10px 38px 10px 18px;
}
.lots-select i { position: absolute; right: 15px; pointer-events: none; font-size: 16px; color: var(--text-muted); }

/* ============ LOT GRID — c-lcard with an actions footer ============ */
.lots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; margin-top: 28px; }
.lots-grid.is-list { grid-template-columns: 1fr; gap: 12px; }

.lot-card { display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.lot-card:hover { transform: translateY(-4px); box-shadow: 0 26px 54px -30px rgba(0,0,0,.4); }
.lot-card .c-limg img { transition: transform .5s; }
.lot-card:hover .c-limg img { transform: scale(1.04); }
.lot-card .c-lbody { flex: 1; }
.lot-card .c-lfav.is-on { color: var(--brand-deep); }
.lot-card .c-lclock.is-ended i { color: var(--text-muted); }
.lot-card .c-lclock strong { font-weight: 600; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.lot-card .c-laddr strong { color: var(--text-primary); font-weight: 600; font-size: 13px; }
/* An unlabelled figure reads as a sale price; this is an opening bid.
   Label type follows the library's in-panel label (c-bidmeta .cell .l). */
.lot-price-label {
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted);
  margin-bottom: 2px;
}
.lot-card .c-lprice-row { align-items: flex-end; }

/* At 4-up the spec row has to wrap rather than overflow. */
.lot-card .c-lspec { flex-wrap: wrap; gap: 6px 12px; }
.lot-card .c-laddr { line-height: 1.45; }

/* Status pill sits beside the fav button, using the library's tag colours. */
.lot-status {
  position: absolute; top: 12px; right: 52px;
  background: var(--surface-white); color: var(--text-body);
  border: 1px solid var(--line-soft);
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.lot-status.is-upcoming { background: #FFF3C4; color: #8A6D0B; border-color: transparent; }
.lot-status.is-closed { background: var(--surface-light); color: var(--text-muted); border-color: transparent; }

/* Inside a card the library uses its card-CTA geometry (c-fa-cta: filled,
   12px radius) rather than the 999px page-level pill, and the outline twin
   needs a 1.5px border or it vanishes against the white card. */
.lot-actions { display: flex; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-soft); margin-top: auto; }
.lot-actions .c-btn {
  flex: 1; padding: 12px 14px; font-size: 13.5px;
  border-radius: 12px; box-shadow: none;
}
.lot-actions .c-btn--primary { background: var(--brand); color: #1c1c1c; }
.lot-actions .c-btn--primary:hover { background: var(--brand-deep); }
.lot-actions .c-btn--out {
  flex: 0 0 auto; text-decoration: none;
  border: 1.5px solid var(--line); color: var(--text-primary);
}
.lot-actions .c-btn--out:hover { border-color: var(--text-primary); background: var(--surface-light); }
.lot-actions .c-btn--out:disabled { color: var(--text-muted); border-color: var(--line-soft); cursor: not-allowed; }

/* List variant */
.lots-grid.is-list .lot-card { flex-direction: row; }
.lots-grid.is-list .c-limg { width: 260px; flex-shrink: 0; aspect-ratio: auto; }
/* Top-aligned, not centred: the caption column is another text field and has
   to sit on the same line as the ones beside it. */
.lots-grid.is-list .c-lbody { flex-direction: row; align-items: flex-start; gap: 26px; padding: 18px 22px; }
.lots-grid.is-list .lot-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.lots-grid.is-list .lot-money { width: 240px; flex-shrink: 0; }
/* Clears the "STARTING BID" label so the caption lines up with the figure. */
.lots-grid.is-list .lot-money .c-lby { border-top: none; padding-top: 19px; }
.lots-grid.is-list .lot-actions {
  flex-direction: column; width: 168px; flex-shrink: 0;
  border-top: none; padding-top: 0; margin-top: 0;
}

/* Empty state */
.lots-empty { grid-column: 1 / -1; }

/* Pagination */
.lots-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 32px; flex-wrap: wrap;
}

/* ============ CLOSER ============ */
.lot-closer { padding-bottom: 72px; }
.c-needhelp .s { max-width: 460px; }
.c-needhelp .acts { flex-wrap: wrap; }

/* =====================================================
   TERMS OVERLAY — the library's c-doc, shown as a dialog
   ===================================================== */
.tmodal {
  position: fixed; inset: 0; z-index: 2200; display: none;
  align-items: center; justify-content: center; padding: 32px;
  background: rgba(16,34,66,.6);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.tmodal.is-open { display: flex; }
.tmodal-doc {
  width: 100%; max-width: 1020px; max-height: 100%;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.6);
  animation: tmodalRise .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes tmodalRise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}
.tmodal .c-doc-hero { position: relative; padding-right: 220px; flex-shrink: 0; }
.tmodal-hero-actions {
  position: absolute; top: 34px; right: 40px;
  display: flex; align-items: center; gap: 10px;
}
.tmodal-hero-actions .c-btn { text-decoration: none; }
.tmodal-hero-actions .c-icon-btn { width: 38px; height: 38px; font-size: 17px; }

/* The document's own grid becomes the scroll container. The library's 150px
   table of contents is sized for 5 entries; 12 numbered ones need a little more. */
.tmodal .c-doc-inner { overflow-y: auto; min-height: 0; flex: 1; grid-template-columns: 178px 1fr; }
.tmodal .c-doc-inner:focus { outline: none; }
.tmodal .c-doc-toc { top: 0; }
.c-doc-sec { scroll-margin-top: 4px; }
.c-doc-sec + .c-doc-sec { margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.c-doc-sec h4.sub { margin-top: 22px; }
.c-doc-sec strong { color: var(--text-primary); font-weight: 600; }

.tlist { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tlist li {
  position: relative; padding-left: 26px;
  font-family: var(--font-display); font-size: 14px; line-height: 1.7; color: var(--text-body);
}
.tlist li::before {
  content: ""; position: absolute; left: 8px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

/* Good Faith Authorization explainer */
.tcallout {
  margin: 4px 0 20px; padding: 18px 20px;
  background: rgba(234,203,44,.14); border: 1px solid rgba(234,203,44,.55);
  border-radius: 14px;
}
.tcallout-head {
  display: flex; align-items: center; gap: 9px; margin-bottom: 10px;
  font-family: var(--font-ui); font-size: 15px; font-weight: 700; color: var(--text-primary);
}
.tcallout-head i { font-size: 19px; color: var(--brand-deep); }
.tcallout p { font-size: 13.5px; margin-bottom: 10px !important; }
.tcallout-meta { font-family: var(--font-ui) !important; font-size: 12.5px !important; }
.tcallout-cta { padding: 10px 20px; font-size: 13px; text-decoration: none; margin-top: 6px; }

/* Pre-auction offer contacts, as appointment rows */
.tcontact-list { margin: 14px 0 20px; }
.tcontact-list .c-apptitem { text-decoration: none; }
.tcontact-list .c-apptitem:hover { border-color: var(--text-primary); }
.tcontact-l {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}
.tcontact-l i { font-size: 16px; color: var(--brand-deep); }

/* Advisory note */
.tnote {
  background: var(--bg); border-left: 3px solid var(--line);
  border-radius: 0 10px 10px 0; padding: 14px 18px; margin-bottom: 0 !important;
}

/* Verbatim capitalised clause — set small and tight so it reads as a quoted
   block rather than as shouting body copy. */
.tlegal {
  margin: 4px 0 18px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg);
}
.tlegal p {
  font-family: var(--font-ui) !important; font-size: 11.5px !important;
  line-height: 1.75 !important; letter-spacing: .012em; color: var(--text-muted) !important;
  margin-bottom: 12px !important;
}
.tlegal p:last-child { margin-bottom: 0 !important; }

.tnotice {
  display: flex; gap: 11px; align-items: flex-start;
  background: rgba(224,70,70,.08); border: 1px solid rgba(224,70,70,.28);
  border-radius: 12px; padding: 14px 16px;
}
.tnotice i { font-size: 19px; color: var(--status-red); flex-shrink: 0; margin-top: 1px; }
.tnotice p { font-family: var(--font-ui) !important; font-size: 13px !important; margin-bottom: 0 !important; }

.tmodal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 40px; border-top: 1px solid var(--line-soft); background: var(--bg); flex-shrink: 0;
}
.tmodal-foot-note {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-ui); font-size: 13px; color: var(--text-muted);
}
.tmodal-foot-note i { font-size: 16px; color: var(--brand-deep); }
.tmodal-foot-actions { display: flex; gap: 10px; }
.tmodal-foot-actions .c-btn { padding: 11px 22px; font-size: 13.5px; }

body.tmodal-lock { overflow: hidden; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1500px) {
  .lots-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1280px) {
  .stat-rail-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-rail .c-fa-cell:nth-child(3n+1) { border-left: none; }
  .stat-rail .c-fa-cell:nth-child(n+4) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 1120px) {
  .lots-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .masthead-inner { grid-template-columns: 1fr; gap: 28px; }
  .masthead-clock { max-width: 360px; }
  .lot-layout { grid-template-columns: 1fr; gap: 36px; }
  .lot-right { position: relative; top: 0; }
  .lots-grid.is-list .c-lbody { flex-direction: column; align-items: stretch; }
  .lots-grid.is-list .lot-money,
  .lots-grid.is-list .lot-actions { width: auto; }
  .lots-grid.is-list .lot-money .c-lby { padding-top: 0; }
  .lots-grid.is-list .lot-actions { flex-direction: row; }
}
@media (max-width: 900px) {
  .tmodal { padding: 0; align-items: stretch; }
  .tmodal-doc { max-width: none; height: 100%; border-radius: 0; border: none; }
  .tmodal .c-doc-hero { padding: 20px 20px 16px; }
  .tmodal .c-doc-hero h3 { font-size: 22px; }
  .tmodal-hero-actions { position: static; margin-top: 14px; }
  .tmodal-hero-actions .c-btn { display: none; }
  /* The side table of contents becomes a chip rail above the text. */
  .tmodal .c-doc-inner {
    grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr);
    gap: 0; padding: 0;
  }
  .tmodal .c-doc-toc {
    position: static; flex-direction: row; overflow-x: auto; gap: 8px;
    padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
    scrollbar-width: none;
  }
  .tmodal .c-doc-toc::-webkit-scrollbar { display: none; }
  .tmodal .c-doc-toc a {
    flex: 0 0 auto; white-space: nowrap; border-radius: 999px;
    border: 1px solid var(--line-soft); padding: 7px 14px;
  }
  .tmodal .c-doc-body { padding: 22px 20px 36px; }
  .tmodal-foot { padding: 14px 20px; }
  .tmodal-foot-note { display: none; }
  .tmodal-foot-actions { width: 100%; }
  .tmodal-foot-actions .c-btn--primary { flex: 1; }
}
@media (max-width: 820px) {
  .lot-breadcrumb-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .masthead-inner { padding: 28px 24px 32px; }
  .masthead-title { font-size: 32px; }
  .stat-rail { margin: -22px 16px 0; }
  .stat-rail-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-rail .c-fa-cell:nth-child(3n+1) { border-left: 1px solid var(--line-soft); }
  .stat-rail .c-fa-cell:nth-child(2n+1) { border-left: none; }
  .stat-rail .c-fa-cell:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
  .lots-grid, .lots-grid.is-list { grid-template-columns: 1fr; }
  .lots-grid.is-list .lot-card { flex-direction: column; }
  .lots-grid.is-list .c-limg { width: auto; aspect-ratio: 4/3; }
  .lots-head h3 { font-size: 28px; }
}

/* =====================================================
   IMAGE TAGS
   The coloured badges configured under Admin config > Image tags. Each tag
   carries its own bg/fg from the admin palette, so these rules only own
   geometry — colour arrives inline.
   ===================================================== */
/* Same treatment as .ptag--attr on the property detail page, scaled down for a
   four-up card: pale surface, no per-tag colour, icon + label. */
.lot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lot-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-light); color: var(--text-body);
  font-family: var(--font-ui); font-size: 12px; font-weight: 600;
  padding: 6px 11px; border-radius: 9px; line-height: 1.2; white-space: nowrap;
}
.lot-tag i { font-size: 14px; }
.lot-tag.is-more { background: transparent; color: var(--text-muted); padding-left: 4px; }

@media (max-width: 820px) {
  /* The category drops under the name rather than being squeezed off-row. */
}
