:root {
  color-scheme: light;
  --ink: #202d2e;
  --muted: #536463;
  --line: #d8dcd5;
  --paper: #f4f4ef;
  --card: #fffefa;
  --copper: #a34221;
  --green: #215e4d;
  --digits: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 15px/1.58 "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-wrap: anywhere;
}
.wrap { width: min(1160px, calc(100% - 80px)); margin-inline: auto; }
main { padding: 20px 0 40px; }
h1, h2, p, dl, dd { margin: 0; }
h1, h2 { line-height: 1.3; }
h1 { font-size: clamp(29px, 3.4vw, 44px); letter-spacing: -.035em; }
h2 { font-size: 21px; }
p + p, main > p, form + p { margin-block: .7em; }
a { color: var(--copper); text-underline-offset: 4px; }
button, input, summary { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #126f91; outline-offset: 3px; }
.skip { position: absolute; left: -100vw; top: 0; background: white; padding: 9px; z-index: 1; }
.skip:focus { left: 8px; }
time, .digit, .num, .version, .ref, .hero-facts strong, .preview-price strong {
  font-family: var(--digits);
  font-variant-numeric: tabular-nums lining-nums;
}
small, .hint, .aside-note { color: var(--muted); font-size: 13px; }
.mast { background: var(--card); border-bottom: 1px solid var(--line); }
.mast-inner, .brand, .product-nav, .identity, .chips, .section-title, .actions, .context {
  display: flex; align-items: center; gap: 12px;
}
.mast-inner { min-height: 76px; gap: 32px; }
.brand { flex: none; gap: 8px; }
.brand b { font: 800 27px/1 Arial, sans-serif; letter-spacing: -1.7px; }
.brand > span:last-child { border-left: 1px solid var(--line); padding-left: 12px; font-size: 13px; }
.seam { width: 25px; height: 27px; background: repeating-linear-gradient(151deg,var(--copper) 0 5px,transparent 5px 8px); clip-path: polygon(0 37%,100% 0,100% 63%,0 100%); }
.product-nav { align-self: stretch; gap: 20px; }
.product-nav a { display: flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.product-nav a:hover, .table-link:hover { color: var(--copper); }
.product-nav [aria-current] { color: var(--ink); box-shadow: inset 0 -3px var(--copper); }
.identity { margin-left: auto; min-width: 0; line-height: 1.35; }
.identity small, .candidate small, .ranking td small { display: block; }
.demo { border: 1px solid var(--line); padding: 2px 7px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.crumb, .return { font-size: 13px; }
.crumb { color: var(--muted); margin: 0 0 16px; }
.crumb a { color: inherit; }
.context { justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.context .crumb { margin: 0; }
.hero {
  color: #fafbf5; background: linear-gradient(95deg, #212d2f 30%, #212d2fa6), #212d2f url(strata.png) right center / cover;
  padding: 28px 34px; border-radius: 12px;
}
.hero h1 { margin: 10px 0 5px; }
.hero p, .hero dt, .ref, .candidate small { color: #d6ded6; }
.ref, .countdown { font-size: 13px; }
.badge, .version, .compare { display: inline-block; padding: 3px 8px; border-radius: 5px; font-size: 13px; }
.badge.live { color: var(--green); background: #d9eee2; }
.badge.dim, .version { color: #46554f; background: #ebede6; }
.badge.wait, .compare { color: #80501c; background: #f9eed9; }
.version { border: 1px solid #cbd0c5; }
.hero-facts { display: grid; grid-template-columns: 1fr 1fr 1.5fr; gap: 16px; border-top: 1px solid #ffffff38; margin-top: 20px; padding-top: 14px; }
.hero-facts > div + div { border-left: 1px solid #ffffff38; padding-left: 18px; }
.hero-facts dt { font-size: 13px; }
.hero-facts dd { margin-top: 4px; font-size: 13px; }
.hero-facts strong { font-size: clamp(24px,2.5vw,34px); line-height: 1.2; }
.deadline { font-size: clamp(16px,1.5vw,22px); }
.hero .countdown { margin: 10px 0 0; }
.quality-jump { display: none; }
.columns { display: grid; grid-template-columns: minmax(0,1.04fr) minmax(0,1fr); gap: 18px; align-items: start; }
.columns, .flow, .ledger, .receipt { margin-top: 18px; }
.card { padding: 24px 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); min-width: 0; }
.card h2::before { content: ""; display: inline-block; width: 4px; height: .9em; margin-right: 9px; background: var(--copper); }
.card > h2, .section-title { margin-bottom: 16px; }
.section-title { justify-content: space-between; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 10px 12px; }
thead { color: var(--muted); background: #f0f1eb; }
thead th { font-size: 13px; font-weight: 600; }
.num { text-align: right; }
.terms { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 13px 0 0; }
.terms dt, .terms dd { display: inline; }
.terms dt { color: var(--muted); margin-right: 6px; }
.state-note { padding: 12px 14px; background: #f1f1ea; border: 1px solid #dcded1; border-left: 3px solid #899580; border-radius: 6px; }
.state-note.active { background: #f9eed9; border-color: #ddc8a5; border-left-color: #86501b; }
.state-note p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.price-form, .rebid, .withdraw, .preview-price, .actions, .preview .state-note { margin-top: 16px; }
.price-form label { display: block; font-weight: 600; margin-bottom: 5px; }
.price-field { display: flex; align-items: center; border: 1px solid #aab7ad; padding: 0 12px; background: white; border-radius: 6px; }
.price-field input { width: 100%; min-width: 0; min-height: 44px; border: 0; font: 600 19px var(--digits); }
.price-field span { white-space: nowrap; font-size: 13px; }
.price-field:focus-within { outline: 2px solid #126f91; }
.price-field input:focus { outline: none; }
.price-form .hint { margin: 6px 0 13px; }
.errorlist { color: #91391c; }
.btn, .record-link, .table-link, .return { display: inline-flex; min-height: 44px; align-items: center; }
.btn { justify-content: center; gap: 12px; padding: 9px 16px; border-radius: 6px; border: 1px solid transparent; font-size: 14px; font-weight: 650; text-decoration: none; background: var(--copper); color: white; }
.btn:hover { background: #843319; }
.btn.secondary { background: var(--card); border-color: #b4bfb4; color: var(--ink); }
.btn.secondary:hover { background: #eff0e9; }
.btn.full { width: 100%; justify-content: space-between; }
.rebid:not([open]), .withdraw { display: inline-block; margin-right: 8px; }
.rebid summary::-webkit-details-marker { display: none; }
.record-link { font-size: 13px; }
.preview { max-width: 640px; margin-inline: auto; }
.preview h1 { font-size: 30px; margin-bottom: 6px; }
.preview-price { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.preview-price strong { font-size: 24px; }
.actions { flex-wrap: wrap; }
.receipt { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 20px 26px; border-radius: 12px; background: #e6f0e6; border: 1px solid #b9cdbb; color: #244b38; }
.stamp { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 3px double #8cae94; font-size: 24px; }
.receipt h2 { font-size: 22px; margin-top: 3px; }
.stub { border-left: 1px dashed #9bb49e; padding-left: 18px; }
.stub time { display: block; }
.table-link { color: var(--ink); font-weight: 650; }
.aside-note, .confirm-strip { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.admin-summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.candidate { max-width: 48%; border-left: 1px solid #ffffff55; padding-left: 22px; }
.candidate strong { font-size: 24px; }
.table-scroll { overflow-x: auto; margin: 12px 0; }
.ranking .winner { background: #e3f0e7; }
.winner td:first-child { box-shadow: inset 3px 0 var(--green); }
.ranking td time { white-space: nowrap; font-size: 13px; }
.ranking td small { font: 12px/1.5 -apple-system, BlinkMacSystemFont, sans-serif; }
.rank-reason strong { margin-right: 8px; color: var(--green); }
@media (max-width: 759px) {
  .wrap { width: calc(100% - 32px); }
  main { padding-top: 14px; }
  .mast-inner { flex-wrap: wrap; min-height: auto; gap: 4px 12px; padding-top: 10px; }
  .brand > span:last-child { display: none; }
  .identity { flex: 1; justify-content: flex-end; font-size: 13px; text-align: right; }
  .product-nav { order: 3; flex-basis: 100%; }
  .hero { padding: 18px; }
  .hero h1 { font-size: 25px; }
  .hero-facts { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
  .hero-facts > div:last-child { grid-column: 1 / -1; border: 0; padding: 0; }
  .deadline { font-size: 15px; }
  .quality-jump { display: inline-flex; min-height: 44px; align-items: center; color: #f3d1b2; }
  .columns { grid-template-columns: minmax(0,1fr); gap: 12px; }
  #bid-panel { grid-row: 1; }
  .card { padding: 16px; }
  h2 { font-size: 18px; }
  .receipt { padding: 16px; gap: 10px; grid-template-columns: 36px minmax(0,1fr); }
  .stamp { width: 36px; height: 36px; }
  .receipt h2 { font-size: 18px; }
  .stub { grid-column: 1 / -1; border: 0; border-top: 1px dashed #9bb49e; padding: 7px 0 0; }
  .stub time { display: inline; margin-left: 6px; }
  .ledger thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ledger table, .ledger tbody, .ledger tr { display: block; }
  .ledger td { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; }
  .ledger td[data-label]::before { content: attr(data-label); font-size: 13px; color: var(--muted); }
  .ledger time { text-align: right; font-size: 13px; }
  .ledger .personal-result { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-inline: 8px; }
  .ledger tr + tr { margin-top: 12px; }
  .admin-summary { display: block; }
  .candidate { max-width: 100%; margin-top: 12px; padding: 0; border: 0; }
  .ranking table { min-width: 760px; }
}

/* Buyer workspace and shared account navigation */
.mast-inner { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 28px; }
.account-bar { display: contents; }
.mast-inner:has(.account-bar) { grid-template-columns: auto minmax(0,1fr) auto; }
.product-nav { gap: 22px; }
.product-nav a { min-width: 44px; justify-content: center; font-size: 14px; font-weight: 600; }
.identity { max-width: 300px; padding-block: 6px; }
.identity-name { min-width: 0; overflow-wrap: anywhere; font-size: 13px; }
.identity form { flex: none; }
.logout { border: 0; background: transparent; color: var(--copper); min-height: 44px; padding: 0 6px; font-size: 13px; font-weight: 650; }
.logout:hover, .more:hover { text-decoration: underline; }
.more, .crumb a { display: inline-flex; align-items: center; min-height: 44px; }
.more { gap: 5px; font-size: 13px; font-weight: 600; text-decoration: none; }
.desk-title, .spot-meta, .spot-bottom, .activity-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.desk-title { margin: 8px 0 20px; }
.desk-title h1 { font-size: 36px; }
.as-of { color: var(--muted); font-size: 12px; text-align: right; }
.as-of time { display: block; }
.work-grid { display: grid; grid-template-columns: minmax(0,1.24fr) minmax(0,1fr); gap: 18px; }
.spot, .login-art { background: linear-gradient(90deg,#212e2f 0%,#212e2fb8 32%,#212e2f08 78%), #212e2f url(strata.png) center / cover; color: #f5f7ed; }
.spot { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 26px 28px; border-radius: 12px; }
.spot-meta, .spot-bottom { align-self: stretch; }
.spot-meta strong { font-size: 13px; }
.spot-meta strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #e0a276; }
.spot h2 { font-size: 30px; margin: 10px 0 3px; }
.spot h2 a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: none; }
.spot h2 a:hover { text-decoration: underline; }
.spot p, .spot-bottom { color: #d4dfd6; }
.spot-bottom { margin-top: 20px; padding-top: 16px; border-top: 1px solid #8d9d9266; align-items: flex-end; font-size: 13px; }
.spot-bottom time, .spot-bottom time span { display: block; }
.spot-bottom time b { color: #f5f7ed; font-size: 39px; line-height: 1.2; letter-spacing: -.06em; }
.btn.light { background: #f4f4ea; color: #293731; }
.activity { padding: 12px 22px 10px; }
.activity .section-title, .market-group .section-title { margin-bottom: 4px; }
.activity .section-title h2::before, .market-group h2::before { content: ""; display: inline-block; width: 4px; height: .85em; margin-right: 9px; background: var(--copper); }
.activity article, .work-empty { border-top: 1px solid var(--line); padding: 8px 0 12px; }
.activity .table-link, .market-table .table-link { text-decoration: none; }
.activity .badge { flex-shrink: 0; }
.activity-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.activity-meta time { font-size: 12px; }
.work-empty h3 { margin: 10px 0 3px; }
.work-empty p { color: var(--muted); margin-bottom: 12px; }
.market-group { margin-top: 22px; }
.market-group .section-title { min-height: 44px; }
.market-table, .profile-panel, .login-box { border: 1px solid var(--line); background: var(--card); border-radius: 12px; overflow: hidden; }
.market-table tbody tr:last-child td { border-bottom: 0; }
.lot-time { font-size: 13px; }
.profile-panel { margin-top: 16px; }
.profile-hero, .profile-body { padding: 24px 26px; }
.profile-hero { background: #212e2f; color: #f6f7ef; }
.profile-hero h2 { font-size: 27px; margin-top: 8px; }
.profile-body { max-width: 780px; }
.profile-body dl { margin-block: 12px 18px; }
.profile-body dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-block-start: 1px solid var(--line); }
.profile-body dt { flex: none; color: var(--muted); }
.profile-body dd { text-align: right; }
.login-box { display: grid; grid-template-columns: 1fr 1fr; max-width: 940px; margin: 6vh auto; }
.login-art, .login-form { padding: 36px; }
.login-art { display: flex; flex-direction: column; justify-content: flex-end; }
.login-art h1 { font-size: 36px; }
.login-art p { margin-top: 8px; }
.login-form label { display: block; font-weight: 600; }
.login-form input { width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid #aab7ad; border-radius: 5px; }
.login-form h2, .login-form p { margin-bottom: 14px; }
.login-form .more { margin-left: 12px; }
@media (max-width: 759px) {
  .mast-inner, .mast-inner:has(.account-bar) { grid-template-columns: auto minmax(0,1fr); gap: 0 8px; padding: 0; min-height: 52px; }
  .identity { grid-column: 2; grid-row: 1; gap: 6px; max-width: none; text-align: left; }
  .identity .demo { white-space: normal; max-width: 38px; }
  .product-nav { grid-column: 1/-1; grid-row: 2; display: flex; gap: 0; border-top: 1px solid var(--line); }
  .product-nav a { flex: 1; }
  .desk-title { margin: 6px 0 14px; }
  .desk-title h1 { font-size: 29px; }
  .as-of, .as-of time { font-size: 11px; }
  .work-grid, .login-box { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .spot { padding: 20px; }
  .spot h2, .profile-hero h2 { font-size: 23px; }
  .spot p { font-size: 13px; }
  .spot-bottom { margin-top: 14px; padding-top: 13px; }
  .spot-bottom time b { font-size: 30px; }
  .activity, .profile-hero, .profile-body, .login-form, .login-art { padding: 16px; }
  .market-table table, .market-table tbody { display: block; }
  .market-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .market-table tbody tr { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 2px 12px; padding: 8px 16px 12px; border-top: 1px solid var(--line); }
  .market-table tbody tr:first-child { border: 0; }
  .market-table td { border: 0; padding: 0; align-self: center; }
  .lot-name { grid-column: 1; grid-row: 1; }
  .lot-state { grid-column: 2; grid-row: 1; justify-self: end; }
  .lot-type { grid-column: 1; grid-row: 2; }
  .lot-tons { grid-column: 2; grid-row: 2; }
  .lot-time { grid-column: 1/-1; color: var(--muted); }
  .lot-time::before { content: attr(data-label); margin-right: 8px; }
  .login-box { margin-block: 16px; gap: 0; }
  .login-art h1 { font-size: 26px; }
}
