/* Screen additions for the bidding web app. Tokens only, from site.css; no new colours, fonts or gradients. */
.flush{margin:0}
.error .flush+ul,.notice .flush+ul{margin-top:8px}
.notice{margin:24px 0}
.notice>*+*{margin-top:12px}
.notice .application-actions{margin:16px 0 0}
.error>.flush+*{margin-top:12px}
[tabindex="-1"]:focus{outline:none}
button:disabled,button:disabled:hover{background:var(--bg-panel);border-color:var(--border);color:var(--fg-muted);cursor:not-allowed}
.lead .code{margin-right:6px}
.signin-panel{max-width:640px}
.how-to-bid{list-style:none;margin:0 0 24px;padding:0;display:flex;flex-direction:column;gap:16px}
.how-to-bid h3{margin:0 0 4px;font-size:16px}
.how-to-bid p{margin:0 0 4px}
.link-button{display:inline;min-height:0;padding:0;border:0;background:none;color:var(--inglis-blue);font:inherit;text-decoration:underline;cursor:pointer}
.link-button:hover,.link-button:active{background:none;color:var(--inglis-blue-dark);text-decoration:none}

/* Loading lines show a small turning ring; it stays still under reduced motion. */
.loading::before{content:"";display:inline-block;width:12px;height:12px;margin-right:10px;border:2px solid var(--border);border-top-color:var(--inglis-blue);border-radius:50%;vertical-align:-1px;animation:loading-turn .9s linear infinite}
@keyframes loading-turn{to{transform:rotate(360deg)}}

/* Disclosure summaries are full-size targets. */
.lot-log-note>summary,.passout-answers>summary,.bidlog-filters>summary,.csv-raw>summary,.submitted-personal>summary{padding:12px 0;cursor:pointer}

.masthead nav{flex-wrap:wrap;justify-content:flex-end;row-gap:4px}
.nav-toggle{display:none}
@media(max-width:1000px){
  .masthead-inner{flex-direction:row;flex-wrap:wrap;align-items:center;gap:0 12px;padding-top:10px;padding-bottom:10px;min-height:64px}
  .brand{min-width:0;flex:1;gap:10px}
  .brand span{padding-left:10px;white-space:normal;font-size:11px;max-width:130px;line-height:1.5}
  .nav-toggle{display:inline-flex;flex:none;padding:9px 12px;min-height:44px;background:transparent;border-color:var(--on-blue-rule);font-size:14px}
  .nav-toggle[aria-expanded=false]+nav{display:none}
  .masthead nav{flex:0 0 100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 16px;margin-top:10px;padding-top:10px;border-top:1px solid var(--on-blue-rule)}
  .masthead nav a,.masthead nav .text-button{white-space:normal;min-height:44px;display:flex;align-items:center;justify-content:flex-start}
}

/* Record tables become labelled cards; the detailed bid log and compact tables keep their columns. */
.table-value>.inline{flex-wrap:wrap;align-items:center}
.table-value>.inline>button{flex-shrink:0}
.table-value .sale-code{white-space:nowrap}
.table-value input[type=text]{min-width:180px}
@media(max-width:850px){
  .table-records:not(.table-compact){overflow:visible;border:0;background:transparent}
  .table-records:not(.table-compact) table,.table-records:not(.table-compact) tbody{display:block;width:100%;min-width:0}
  .table-records:not(.table-compact) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .table-records:not(.table-compact) tbody tr{display:block;border:1px solid var(--divider);margin:0 0 12px;padding:8px 0;background:var(--white)}
  .table-records:not(.table-compact) td{display:grid;grid-template-columns:minmax(80px,30%) minmax(0,1fr);gap:12px;padding:7px 16px;border:0}
  .table-records .table-label{display:block;font-size:12px;font-weight:700;line-height:1.6;color:var(--fg-muted);padding-top:1px}
  .table-records .table-value{margin:0}
  .table-records .table-value input[type=text]{min-width:0}
  .table-records .table-value>.inline{flex-wrap:wrap}
  .table-records td button{white-space:normal}
  .table-compact .table-label{display:none}
  .table-compact td,.table-compact th{padding:10px 12px}
}
@media(max-width:380px){
  .table-records:not(.table-compact) td{grid-template-columns:minmax(0,1fr);gap:2px}
}

.choice-group{min-width:0;margin:24px 0 0}
.choice-group .check{display:inline-flex;margin:12px 28px 4px 0}

.search-form{margin:0 0 20px}
.search-form>a{display:inline-block;margin-top:8px;font-size:14px}
.search-form .inline{flex-direction:row;flex-wrap:wrap}
.search-form .inline input{flex:1 1 160px;width:auto}
.search-form .inline button{flex:none}
.review-note .application-actions{flex-direction:column;align-items:stretch;gap:12px}

/* A back link always sits above the page's eyebrow, on its own line. */
.application-heading>div>.back{display:flex;width:max-content;max-width:100%}

.application-heading.lot-log-heading{margin-bottom:20px;padding-bottom:0;gap:16px}
.lot-log-heading h1{font-size:clamp(28px,4vw,38px);margin-bottom:10px}
.lot-log-heading .lead{font-size:16px;margin-bottom:0}
.lot-log-search{display:flex;align-items:end;gap:12px;margin:20px 0;max-width:400px}
.lot-log-search>div{flex:1;min-width:0}
.lot-log-search label{margin-top:0}
.lot-log-search input{width:100%;box-sizing:border-box}
.lot-log-search button{white-space:nowrap}
.lot-log-tabs{display:flex;flex-wrap:wrap;gap:8px 24px;border-bottom:1px solid var(--border);margin-bottom:24px}
.lot-log-tabs a{padding:12px 0;color:var(--fg-muted);text-decoration:none;border-bottom:3px solid transparent}
.lot-log-tabs a:hover{color:var(--inglis-blue-dark)}
.lot-log-tabs a[aria-current=page]{color:var(--inglis-blue);border-color:var(--inglis-blue);font-weight:700}
.lot-log-overview{--fg-muted:var(--fg-2);padding:24px;background:var(--bg-panel);border:1px solid var(--border)}
.lot-log-overview h2{margin:0;font-size:28px}
.lot-log-overview p.muted{margin:6px 0 0}
.lot-log-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin:24px 0 0}
.lot-log-facts dt{font-size:12px;color:var(--fg-muted);margin-bottom:6px}
.lot-log-facts dd{margin:0;font-weight:700;overflow-wrap:anywhere}
.lot-log-note{font-size:13px;color:var(--fg-muted);max-width:85ch;line-height:1.6;margin:12px 0 20px}
.passout-list .code{white-space:nowrap}
.passout-list td,.passout-list th{padding-left:12px;padding-right:12px}
.passout-list .passout-bidder{overflow-wrap:break-word}
.passout-list .inline{flex-direction:column;align-items:flex-start}
.passout-list .inline button{white-space:nowrap}
.passout-answers{min-width:200px}
.passout-answers summary{color:var(--inglis-blue);font-weight:700}
.passout-answers .detail-grid{grid-template-columns:minmax(0,1fr);gap:8px;margin:4px 0 0}
.passout-answers .detail-grid dt{margin:0}
.passout-answers .detail-grid dd{font-size:14px;overflow-wrap:break-word}
.passout-reminders{list-style:none;margin:0;padding:0;min-width:140px}
.passout-list .muted{margin:4px 0 0}
.lot-log-timeline{list-style:none;padding:0;margin:0;max-width:1000px}
.lot-log-timeline li{display:grid;grid-template-columns:220px minmax(0,1fr);gap:28px;padding:22px 0;border-bottom:1px solid var(--border);position:relative}
.lot-log-time{display:grid;align-content:start;gap:6px;font-variant-numeric:tabular-nums}
.lot-log-gap{font-weight:700;color:var(--inglis-blue);font-size:14px}
.lot-log-time time{font-size:12px;color:var(--fg-muted)}
.lot-log-timeline p{margin:0;font-size:18px;line-height:1.6;overflow-wrap:anywhere}
.lot-log-timeline .muted{display:block;margin-top:8px;font-size:12px}
.lot-log-table{max-width:100%;overflow-x:auto}
.lot-log-table th,.lot-log-table td{padding:12px 18px;font-size:13px;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:640px){
  .lot-log-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}
  .lot-log-overview{padding:18px}
  .lot-log-tabs{gap:6px 18px;font-size:14px}
  .lot-log-timeline li{grid-template-columns:minmax(0,1fr);gap:10px;padding:18px 0}
  .lot-log-time{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
  .lot-log-timeline p{font-size:16px}
}
/* On a phone the bidding log is the plain-English history only, newest first. */
.bidlog-phone{display:none}
@media(max-width:640px){
  .bidlog-wide{display:none!important}
  .bidlog-phone{display:block}
  .lot-log-timeline{display:flex;flex-direction:column-reverse}
  .lot-log-overview{padding:14px 18px}
  .lot-log-overview h2{font-size:22px}
}

.bidlog-filters{border:1px solid var(--border);padding:0 20px;margin:0 0 20px}
.bidlog-filters[open]{padding-bottom:20px}
.bidlog-filters>summary{color:var(--inglis-blue);font-weight:700}
.bidlog-filters .search-form{margin:8px 0 0}
.bidlog-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:16px 20px}
.bidlog-fields>*{min-width:0}
.bidlog-fields input,.bidlog-fields select{width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.bidlog-events{margin:24px 0;min-width:0}
.bidlog-event{border:1px solid var(--border);border-radius:var(--radius-sm);margin:0 0 10px;overflow:hidden}
.bidlog-event summary{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,.65fr) minmax(0,1.2fr) auto;gap:16px;padding:16px;align-items:start;cursor:pointer;font-size:14px;overflow-wrap:anywhere}
.bidlog-event summary:hover,.bidlog-event[open] summary{--fg-muted:var(--fg-2);background:var(--bg-panel)}
.bidlog-event summary:focus-visible{outline:2px solid var(--inglis-blue);outline-offset:-3px}
.bidlog-summary-part{display:grid;gap:5px;min-width:0;font-variant-numeric:tabular-nums}
.bidlog-label{font-size:12px;color:var(--fg-muted)}
.bidlog-expand{color:var(--inglis-blue);font-weight:700;white-space:nowrap}
.bidlog-expand::before{content:'+';margin-right:6px}
.bidlog-event[open] .bidlog-expand::before{content:'−'}
.bidlog-event-body{padding:20px;border-top:1px solid var(--border);min-width:0}
.bidlog-metadata{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 24px;margin:0}
.bidlog-metadata dt{color:var(--fg-muted);font-size:12px;margin:0 0 4px}
.bidlog-metadata dd{margin:0;font-size:14px;overflow-wrap:anywhere}
.bidlog-payload{max-width:100%;margin:20px 0 0;padding:16px;background:var(--bg-panel);font-size:12px;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere}
.bidlog-payload:empty{display:none}
@media(max-width:640px){
  .bidlog-event summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;padding:14px}
  .bidlog-expand{grid-column:1/-1}
  .bidlog-event-body{padding:14px}
  .bidlog-metadata{grid-template-columns:minmax(0,1fr)}
  .bidlog-payload{padding:12px}
}

.suggestion{padding:20px 22px;margin:14px 0;background:var(--white);border:1px solid var(--border);border-radius:var(--radius-sm);overflow-wrap:anywhere}
.suggestion-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.suggestion-head h3{margin:0;font-size:20px}
.suggestion .detail-grid{margin:14px 0;gap:12px 28px}
.suggestion p{margin:8px 0 12px}
.suggestion>:last-child{margin-bottom:0}
.suggestion-evidence{margin:0 0 16px;padding-left:20px;font-size:14px;color:var(--fg-2)}

.table-wrap td input[type=datetime-local]{min-width:210px}
.check-cell{display:flex;align-items:center;min-height:var(--target-min);margin:0}

.live-figures{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 28px;margin:0 0 24px}
.live-figures dt{font-size:12px;color:var(--fg-muted);margin-bottom:4px}
.live-figures dd{margin:0;font-size:20px;font-weight:700;font-variant-numeric:tabular-nums}
.live-current{grid-column:1/-1}
.live-current dd{font:700 clamp(32px,4vw,44px)/1.1 var(--font-body);color:var(--inglis-blue);font-variant-numeric:tabular-nums}
.live-status{margin:0;padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--bg-panel);font-weight:700;text-align:center}
.live-status.open,.live-status.sold{background:var(--positive-bg);color:var(--positive-fg);border-color:transparent}
.live-status.suspended,.live-status.please_wait{background:var(--attention-bg);color:var(--attention-fg);border-color:transparent}
.live-status.stale{background:var(--bg-panel);color:var(--fg-2);border-color:var(--border)}
.live-message{margin:12px 0 0}
/* Sale Day Live: the ring framed like every other administration panel. */
.staff-ring{margin:24px 0 0;padding:32px;border:1px solid var(--divider)}
.staff-ring>.application-heading h2{margin:0 0 24px}
.staff-ring>.live-figures{margin:0}
/* The bidder screen's player fills the 16:9 box live.js builds (#live-video); its status line
   and sound button sit in the controls row under the box. The staff test viewer keeps a panel. */
.live-video video{display:block;width:100%;height:100%;object-fit:contain;background:var(--black)}
.live-video-status,.live-video-sound{margin:0}
.staff-video video{display:block;width:100%;max-width:960px;aspect-ratio:16/9;background:var(--black);border-radius:var(--radius-sm)}
.staff-video .live-video-status,.staff-video .live-video-sound{margin:12px 0 0}
.panel .inline{display:flex;flex-wrap:wrap;gap:12px;align-items:center}
.panel .inline>*{max-width:100%}
.panel .inline>h2{margin:0}
.panel code.code{display:inline-block;padding:6px 10px;background:var(--bg-panel);border:1px solid var(--border);border-radius:var(--radius-sm);overflow-wrap:anywhere}
.application-heading .pill{border:1px solid var(--border);margin-bottom:8px}

.live-connection{display:inline-flex;align-items:center;gap:8px;margin:32px 0 0;font-size:14px;font-weight:700;white-space:nowrap}
.live-connection[hidden]{display:none}
.live-connection.positive{color:var(--positive-fg)}
.live-connection.negative{color:var(--negative-fg)}
.live-dot{flex-shrink:0;width:10px;height:10px;border-radius:50%;background:var(--fg-muted)}
.live-connection.positive .live-dot{background:var(--positive)}
.live-connection.negative .live-dot{background:var(--negative)}

.live-layout p.eyebrow{font-size:12px;color:var(--inglis-blue)}
.live-grid{display:grid;grid-template-columns:minmax(0,7fr) minmax(0,5fr);grid-template-rows:auto 1fr;grid-template-areas:"video panel" "lot panel";gap:32px;align-items:start}
.live-grid>*{min-width:0}
.live-grid .panel{margin:0}

.live-video-region{grid-area:video}
.live-caption-bar{margin:0;padding:10px 16px;background:var(--inglis-blue);color:var(--white);font-size:15px;font-weight:700;line-height:1.4;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.live-video{position:relative;width:100%;aspect-ratio:16/9;background:var(--bg-tint)}
.live-video>.live-video-sound.icon{position:absolute;right:6px;bottom:6px;width:var(--target-min);height:var(--target-min);min-height:0;padding:0;border:0;background:var(--dialog-backdrop);color:var(--white)}
.live-video>.live-video-sound.icon:hover{background:var(--inglis-blue-darker)}
.live-video>.live-video-sound.icon:focus-visible{outline-color:var(--white);outline-offset:-4px}
.live-video-sound svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.live-video-sound .waves,.live-video-sound.on .mute{display:none}
.live-video-sound.on .waves{display:inline}
/* A phone on the live screen does not zoom or slide sideways (live.js lockZoom). */
html.live-open,html.live-open body{touch-action:pan-x pan-y}
html.live-open body{overflow-x:clip}
.live-video-controls{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;margin:8px 0 0;font-size:14px}
.live-video-controls:empty,.live-bar{display:none}

.live-lot-slot{grid-area:lot}
.live-lot h2{margin-bottom:8px}
.live-lot .live-lot-description{margin:0}
.live-lot .detail-grid{margin:20px 0 0}

.live-panel{grid-area:panel;position:sticky;top:24px}
.live-panel .live-current-bid{margin:0 0 20px;font:700 clamp(36px,4vw,48px)/1.1 var(--font-body);letter-spacing:0;color:var(--inglis-blue);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.live-panel .live-current-bid.stale{color:var(--fg-muted)}
.live-panel .live-current-bid.none{font:700 22px/1.3 var(--font-body);letter-spacing:0;color:var(--fg-muted)}
.live-action{width:100%;height:80px;min-height:80px;max-height:80px;padding:18px 24px;font-size:20px;font-weight:700;font-variant-numeric:tabular-nums;line-height:1.25;white-space:normal;overflow-wrap:normal}
/* The resting control states carry the ring result, so their text stays readable (#333 on #F2F2F2, 11.3:1). */
.live-action[aria-disabled=true],.live-action[aria-disabled=true]:hover{background:var(--bg-panel);border-color:var(--border);color:var(--fg-2);cursor:not-allowed}
.live-action.leading[aria-disabled=true],.live-action.leading[aria-disabled=true]:hover{background:var(--positive-bg);border-color:var(--positive);color:var(--positive-fg);font-weight:700}
.application-heading.live-heading{align-items:center;gap:12px;margin-bottom:20px}
.live-heading h1{margin:0;font-size:26px;line-height:1.25;letter-spacing:0}
.live-heading .live-connection{margin:0}
.live-panel .live-bid-caption{margin:8px 0 0;text-align:center}
.live-panel .live-message{text-align:center}
.live-panel p.live-leading,.live-bar p.live-leading{margin:8px 0 0;color:var(--positive-fg);font-weight:700;text-align:center}
/* Something happened to this bidder: outbid on a lot they led, or the lot they bought. */
.live-event{margin:8px 0 0;padding:8px 12px;border-radius:var(--radius-sm);font-size:14px;font-weight:700;line-height:1.35;text-align:center}
.live-event.attention{background:var(--attention-bg);color:var(--attention-fg)}
.live-event.positive{background:var(--positive-bg);color:var(--positive-fg)}
.live-panel-event.positive{display:none}
/* Taps are discarded for half a second after the control starts offering a new amount (bidding.js holdUntil). */
.live-action.changed{animation:live-changed .5s cubic-bezier(.16,1,.3,1)}
@keyframes live-changed{
  from{opacity:.55;box-shadow:0 0 0 3px var(--bg-page),0 0 0 6px var(--attention-fg)}
  to{opacity:1;box-shadow:0 0 0 3px var(--bg-page),0 0 0 6px transparent}
}
@media(prefers-reduced-motion:reduce){
  .live-action.changed{animation:none;box-shadow:0 0 0 3px var(--bg-page),0 0 0 6px var(--attention-fg)}
}
.live-panel .live-figures{gap:0;margin:24px 0 0;border:1px solid var(--divider)}
.live-panel .live-figures>div{min-width:0;padding:14px 16px}
.live-panel .live-figures>div+div{border-left:1px solid var(--divider)}
.live-panel .live-figures dd{color:var(--inglis-blue);overflow-wrap:anywhere}
.live-terms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;margin:16px 0 0}
.live-terms>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px;min-width:0}
.live-terms dt{font-size:12px;color:var(--fg-muted)}
.live-terms dd{margin:0;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.live-ring-messages{margin:24px 0 0;padding-top:20px;border-top:1px solid var(--divider)}
.live-ring-messages p.eyebrow{margin-bottom:8px}
.live-panel .live-said{margin:0;overflow-wrap:anywhere;white-space:pre-line}
.live-panel .live-said strong{color:var(--fg-1)}
.live-panel .live-said-list>*+*{margin-top:8px}
.live-said-time{margin-left:8px;font-size:12px;color:var(--fg-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.live-message-form{margin:16px 0 0}
.live-message-form label{margin-top:0}
.live-message-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}
.live-panel .live-message-actions .field-help{margin:0;font-variant-numeric:tabular-nums}

.live-strip{--fg-muted:var(--fg-2);display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 20px;margin:32px 0 0;padding:14px 18px;background:var(--bg-tint);color:var(--inglis-blue-darker)}
.live-strip p.eyebrow{margin:0}
.live-strip-text{min-width:0;margin:0;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.live-results h2{margin:40px 0 16px}

.live-overlay-open{overflow:hidden}
.live-overlay{position:fixed;inset:0;z-index:20;display:flex;align-items:center;justify-content:center;height:100%;height:100dvh;padding:24px 16px;background:var(--dialog-backdrop)}
.live-purchase{display:flex;flex-direction:column;width:100%;max-width:820px;max-height:100%;margin:0;padding:0;overflow:hidden}
.live-purchase-header{flex:none;padding:20px 28px 16px;border-bottom:1px solid var(--divider)}
.live-purchase h2{margin:0 0 8px}
.live-purchase .lead{margin:0}
.live-purchase-form{display:flex;flex-direction:column;min-height:0;margin:0;overflow:hidden}
.live-purchase-body{min-height:0;padding:20px 28px;overflow-y:auto;overscroll-behavior:contain;scroll-padding:16px;scrollbar-gutter:stable}
.live-purchase-section+.live-purchase-section{margin-top:16px;padding-top:16px;border-top:1px solid var(--divider)}
.live-purchase-section h3{margin:0 0 10px;font:700 18px/1.3 var(--font-body);color:var(--inglis-blue)}
.live-purchase .application-fields{gap:16px 24px}
.live-purchase .choice-group,.live-purchase label{margin-top:0}
.live-purchase .choice-group{margin-bottom:0}
.live-purchase .choice-group .check{margin:8px 16px 0 0}
.live-purchase .application-actions{flex:none;flex-direction:row;flex-wrap:wrap;gap:12px;margin:0;padding:16px 28px;border-top:1px solid var(--divider);background:var(--white)}
.option-list{display:flex;flex-direction:column}
.option-row{display:grid;grid-template-columns:minmax(0,5fr) minmax(0,6fr);gap:6px 32px;align-items:center;min-width:0;padding:12px 0;border-top:1px solid var(--divider)}
.option-row:first-child{padding-top:0;border-top:0}
.option-row:last-child{padding-bottom:0}
.option-text,.option-control{min-width:0}
.live-purchase .option-label{display:block;margin:0;font-size:15px;font-weight:700;color:var(--fg-1)}
.option-help{margin:2px 0 0;font-size:13.5px;line-height:1.45;color:var(--fg-muted)}
.live-purchase-fields[hidden],.purchase-contact-card[hidden],.option-list[hidden]{display:none}
.live-purchase-ring{margin:8px 0 0;font-size:14px;font-weight:700;color:var(--inglis-blue-dark)}
.live-purchase-ring:empty{display:none}
.purchase-contact-card{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;min-width:0;padding:12px 16px;border:1px solid var(--divider);border-radius:var(--radius-md);background:var(--bg-tint)}
.purchase-contact-list{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 16px;min-width:0;margin:0}
.purchase-contact-list>div{display:contents}
.purchase-contact-list dt{font-size:14px;color:var(--fg-2)}
.purchase-contact-list dd{min-width:0;margin:0;font-size:15px;font-weight:700;overflow-wrap:anywhere}
.purchase-contact-change{flex:none}
.option-choices{display:flex;flex-wrap:wrap;gap:8px 12px}
.option-choices.stacked{flex-direction:column;align-items:stretch}
.live-purchase .option-choices .check{align-items:center;min-width:104px;min-height:var(--target-min);margin:0;padding:8px 16px;border:1px solid var(--input-border);border-radius:var(--radius-sm);cursor:pointer}
.live-purchase .option-choices .check input{margin-top:0}
.option-choices .check:has(input:checked){border-color:var(--inglis-blue);background:var(--bg-tint)}
.option-choices .check:focus-within{outline:2px solid var(--focus);outline-offset:2px}
.option-control .field-error{display:block;margin-top:6px}
.option-follow{margin-top:10px}
.live-purchase-summary:empty{display:none}
.live-purchase-summary:not(:empty){margin-bottom:20px}
.live-panel .notice{margin:16px 0 0}
.live-notifications .notice{overflow-wrap:anywhere}

.check-note{display:block;margin-top:2px;overflow-wrap:anywhere}

@media(max-width:850px){
  .live-layout{display:flex;flex-direction:column;gap:24px}
  .live-layout>*{min-width:0}
  .live-layout>:empty{display:none}
  .live-grid{display:contents}
  .live-video-region{order:1}
  .live-panel{order:2}
  .live-lot-slot{order:3}
  .live-layout>div:not(.live-grid){order:4}
  .live-strip{margin-top:8px}
  .live-results h2{margin-top:16px}
  .live-panel{position:static}
  .live-pinned{position:sticky;top:0;z-index:2;background:var(--bg-page)}
  .live-caption-bar{padding:8px 12px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .live-video-controls{flex-wrap:wrap;margin:0;padding:4px 0;font-size:13px;line-height:1.4}
  .live-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px 12px;padding:8px 0 10px;border-bottom:1px solid var(--divider);background:var(--bg-page)}
  .live-bar-meta{flex:0 0 100%;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
  .live-bar .live-connection{margin:0;font-size:13px}
  .live-bar p.live-bar-credit{margin-left:auto;font-size:13px;color:var(--fg-2);font-variant-numeric:tabular-nums}
  .live-bar p{margin:0;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .live-bar-figures{flex:1 1 0;min-width:0}
  .live-bar p.live-bar-lot{font-size:16px;font-weight:700;color:var(--fg-1)}
  .live-bar-bid{font-size:13px;color:var(--fg-2)}
  /* iOS zooms the page when a field under 16 px takes focus, and leaves it zoomed. */
  input:not([type=radio]):not([type=checkbox]),select,textarea{font-size:16px}
  .live-bar-amount{font:700 clamp(24px,7.4vw,30px)/1.15 var(--font-body);color:var(--inglis-blue);font-variant-numeric:tabular-nums;white-space:nowrap}
  .live-bar-amount.none{font-size:17px;line-height:1.3;color:var(--fg-muted)}
  .live-bar-amount.stale{color:var(--fg-muted)}
  .live-bar-action{flex:0 0 auto;margin-left:auto}
  .live-bar-action:empty{display:none}
  .live-bar .live-action{width:160px;height:72px;min-height:72px;max-height:72px;padding:8px 10px;font-size:15px;white-space:normal}
  .live-bar .live-action.priced{font-size:21px}
  .live-bar p.live-bar-bid{white-space:normal}
  .live-bar-amount{display:block}
  .live-panel-price,.live-panel>.live-leading,.live-panel-event,.live-panel-outcome{display:none}
  .live-heading h1{font-size:22px}
  .application-heading.live-heading{margin-bottom:12px}
  .live-bar p.live-bar-status{flex:0 0 100%;min-width:0;padding:6px 10px;font-size:13px;white-space:normal}
  .live-bar p.live-bar-status[hidden]{display:none}
  .live-bar p.live-bar-leading{flex:0 0 100%;margin:0}
  .live-bar p.live-bar-event{flex:0 0 100%;margin:0;white-space:normal;text-align:left}
  .live-bar p.live-bar-outcome{flex:0 0 100%;white-space:normal;font-weight:700}
}
@media(max-width:380px){
  .live-bar .live-action{width:140px}
  .live-bar .live-action.priced{font-size:19px}
}
/* A phone too short to pin the picture as well (under 600 px of viewport, which is most small phones once
   the browser's own bars are counted, and every phone on its side): the picture scrolls with the page and
   the bar alone stays in view. The region loses its box so the bar can stick for the whole screen. */
@media(max-width:850px) and (max-height:600px){
  .live-layout{gap:0}
  .live-video-region{display:contents}
  .live-caption-bar{order:-2}
  .live-bar{order:-1;position:sticky;top:0;z-index:2}
  .live-panel,.live-lot-slot,.live-layout>div:not(.live-grid){margin-top:24px}
}
/* On its side: the picture and the page scroll on the left, the bar holds the right column. */
@media(max-width:850px) and (max-height:600px) and (orientation:landscape){
  .live-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);column-gap:16px;align-items:start}
  .live-caption-bar,.live-video,.live-video-controls,.live-panel,.live-lot-slot,.live-layout>div:not(.live-grid){grid-area:auto;grid-column:1}
  .live-video{max-height:calc(100vh - 44px);max-height:calc(100dvh - 44px)}
  .live-bar{grid-column:2;grid-row:1/span 12;padding-top:0;border-bottom:0}
  .live-bar-figures,.live-bar-action{flex:0 0 100%;margin:0}
  .live-bar .live-action{width:100%}
}
@media(max-width:640px){
  .live-connection{margin:0 0 8px}
  .live-overlay{padding:8px}
  .live-purchase{padding:0}
  .live-purchase-header{padding:16px}
  .live-purchase h2{font-size:24px}
  .live-purchase-body{padding:16px}
  .live-purchase .application-actions{padding:12px 16px}
  .live-purchase .application-actions button{flex:1 1 auto;padding:12px}
  .live-purchase .application-fields{grid-template-columns:minmax(0,1fr)}
  .option-row{grid-template-columns:minmax(0,1fr);gap:8px}
  .purchase-contact-card{flex-direction:column;align-items:stretch;gap:12px}
  .purchase-contact-list{grid-template-columns:minmax(0,1fr);gap:0}
  .purchase-contact-list>div+div dt{margin-top:8px}
  .purchase-contact-change{align-self:flex-start}
  .option-choices .check{flex:1 1 0}
  .live-panel .live-figures>div{padding:12px}
  .live-panel .live-figures dd{font-size:18px}
  .live-strip{padding:12px 16px}
  .panel .inline{align-items:stretch}
  .application-heading h1{font-size:30px}
  .application-heading.live-heading h1{font-size:22px}
  .staff-ring{padding:20px}
}
@media(max-height:600px){
  .live-panel{position:static}
  .live-purchase-header{padding:10px 16px}
  .live-purchase .application-actions{padding:8px 16px}
}

/* Bid monitor: tokens and the shared spacing scale, a status badge and a compact switch. */
.monitor-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.monitor-heading h2{margin:0}
.bid-monitor-panel .monitor-status{margin:0;padding:4px 10px;border-radius:var(--radius-sm);background:var(--bg-tint);color:var(--inglis-blue-dark);font:700 12px/1.4 var(--font-body);letter-spacing:.04em;white-space:nowrap}
.bid-monitor-panel .monitor-status.positive{background:var(--positive-bg);color:var(--positive-fg)}
.bid-monitor-panel .monitor-status.negative{background:var(--negative-bg);color:var(--negative-fg)}
.bid-monitor-panel .monitor-status.attention{background:var(--attention-bg);color:var(--attention-fg)}
.bid-monitor-panel .monitor-status.muted{background:var(--bg-panel);color:var(--fg-2);font-size:12px}
.bid-monitor-panel .monitor-heading+p{margin-top:8px}
.monitor-controls{display:grid;grid-template-columns:minmax(192px,2fr) minmax(128px,1fr);gap:20px;align-items:end;margin:20px 0}
.monitor-controls label,.monitor-database label{margin:0 0 6px}
.monitor-controls select,.monitor-database select{width:100%}
.monitor-controls .inline{flex-direction:row;align-items:center}
.monitor-toggle{justify-content:space-between;gap:10px;min-width:96px;border-radius:24px;padding:6px 12px}
.monitor-toggle::before{content:'';width:26px;height:26px;background:var(--white);border-radius:50%}
.monitor-toggle[aria-checked=true]{flex-direction:row-reverse}
.monitor-toggle[aria-checked=false]{background:var(--warm-grey);border-color:var(--warm-grey)}
.monitor-toggle:disabled{background:var(--bg-panel);color:var(--fg-muted)}
.monitor-toggle:disabled::before{border:1px solid var(--border)}
.bid-monitor-panel [hidden]{display:none!important}
.bid-monitor-panel p{overflow-wrap:anywhere}
.monitor-database{border-top:1px solid var(--divider);padding-top:20px;margin-top:20px}
.monitor-database-controls{display:grid;grid-template-columns:minmax(192px,2fr) minmax(128px,1fr);gap:20px;align-items:end}
.monitor-message:empty{display:none}
.monitor-feed{border-top:1px solid var(--divider);padding-top:20px;margin-top:20px;min-width:0}
.monitor-feed h3{margin:0 0 8px;font-size:18px}
.monitor-feed-url{display:block;overflow-wrap:anywhere;margin-bottom:12px}
.monitor-feed .inline{flex-wrap:wrap;align-items:center}
.monitor-feed p:last-child{margin-bottom:0}
@media(max-width:640px){
  .monitor-controls,.monitor-database-controls{grid-template-columns:1fr}
  .monitor-heading{align-items:flex-start}
  .monitor-feed .inline{flex-direction:row}
}

/* CSV feed monitor: the same panels and spacing as the rest; health is a full tinted box, never a side stripe. */
.csv-monitor .panel{margin:20px 0 0;padding:24px;min-width:0}
.csv-monitor .application-heading{margin-bottom:16px}
.csv-overview{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:20px}
.csv-overview .panel{margin-top:20px}
.csv-overview table{margin:0}
.csv-monitor h2{font-size:24px;margin-top:0}
.csv-monitor .application-heading h1{font-size:clamp(30px,4vw,38px)}
.csv-health{margin:20px 0 0;padding:16px 20px;background:var(--bg-tint);border:1px solid var(--bg-tint);color:var(--inglis-blue-darker)}
.csv-health p{margin:6px 0 0}
.csv-health.positive{background:var(--positive-bg);border-color:var(--positive);color:var(--positive-fg)}
.csv-health.attention{background:var(--attention-bg);border-color:var(--attention-fg);color:var(--attention-fg)}
.csv-health.positive p,.csv-health.attention p{color:var(--fg-1)}
.csv-summary{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap}
.csv-summary p{margin:4px 0}
.csv-price{font:700 28px/1.2 var(--font-body);color:var(--inglis-blue);font-variant-numeric:tabular-nums}
.csv-horse{font-size:18px}
.csv-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 28px;margin:20px 0 0}
.csv-details dt{color:var(--fg-muted);font-size:12px}
.csv-details dd{margin:4px 0 0;overflow-wrap:anywhere}
.csv-raw pre{overflow:auto;max-height:256px;margin:8px 0 0;font-size:13px}
.csv-raw summary{font-weight:700}
@media(max-width:850px){.csv-overview{grid-template-columns:1fr;gap:0}}
@media(max-width:640px){.csv-details{grid-template-columns:1fr}.csv-monitor .panel{padding:20px}}

.review-side{display:flex;flex-direction:column;gap:24px;min-width:0}
.review-side>.panel{margin:0}
.detail-grid.detail-list{grid-template-columns:minmax(0,1fr);gap:12px}
.account-search-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr);gap:16px 20px;align-items:start}
.account-search-fields>*{min-width:0}
.account-search-fields label{margin-top:0}
.account-search-fields select{width:100%;max-width:100%}
@media(max-width:640px){.account-search-fields{grid-template-columns:minmax(0,1fr)}}

/* New-buyer details: the account name alone, the accountant as a pair, each trade reference as one row of three. */
#new-buyer-section>.application-fields:not(#address-fields){grid-template-columns:repeat(6,minmax(0,1fr))}
#new-buyer-section>.application-fields:not(#address-fields)>div{grid-column:span 3}
#new-buyer-section>.application-fields:not(#address-fields)>[data-field=account_name]{grid-column:1/-1}
#new-buyer-section>.application-fields:not(#address-fields)>[data-field^=ref]{grid-column:span 2}
@media(max-width:850px){
  #new-buyer-section>.application-fields:not(#address-fields){grid-template-columns:repeat(2,minmax(0,1fr))}
  #new-buyer-section>.application-fields:not(#address-fields)>div,#new-buyer-section>.application-fields:not(#address-fields)>[data-field^=ref]{grid-column:auto}
}
@media(max-width:640px){
  #new-buyer-section>.application-fields:not(#address-fields){grid-template-columns:minmax(0,1fr)}
}

/* Message templates: the list, the HTML source, the toolbar and the sandboxed preview. */
.template-list{list-style:none;margin:0;padding:0}
.template-item{padding:14px 0;border-top:1px solid var(--divider)}
.template-item:first-child{border-top:0}
.template-item .badge{margin-left:6px}
.template-item-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.template-switch{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.template-source{font:13px/1.5 Consolas,"Cascadia Mono",monospace}
.template-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.template-placeholders ul{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.template-placeholders .code{min-height:var(--target-min)}
.template-frame{display:block;width:100%;height:520px;margin-top:12px;border:1px solid var(--border);background:var(--white)}
.template-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0 0;padding:12px;background:var(--bg-panel);border:1px solid var(--divider);font-size:14px}
@media(max-width:640px){.template-frame{height:420px}}
