/* Steel mill tracker (/steel). Product mode: one left edge, hairlines, square corners. The only colour is data:
   a dot's heat (one hue, light to dark). Brass marks a site the visitor added. */
.mt { max-width: calc(var(--shell) + 2 * var(--gutter)); width: 100%; margin: 0 auto; padding: 2.25rem var(--gutter) 1rem; color: var(--ink); }
.mt-rest { padding-top: 0; padding-bottom: 5rem; }
.mt h1 { max-width: 19em; margin-left: -0.04em; font-weight: 400; font-size: clamp(1.75rem, 1.1rem + 1.9vw, 2.5rem); line-height: 1.18; letter-spacing: -0.02em; text-wrap: balance; }
.mt-sub { max-width: 44em; margin-top: 0.75rem; color: var(--muted); }
.mt .num, .mt-stage .num { font-family: var(--serif); font-variant-numeric: tabular-nums lining-nums; }

.mt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem 2rem; }
.mt-head input { width: 19rem; max-width: 100%; }
.mt-tools { margin-top: 1rem; }
.mt input, .mt-stage input { height: 2.5rem; padding: 0 0.75rem; border: 1px solid var(--rule-strong); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 0.9375rem; }
.mt input::placeholder, .mt-stage input::placeholder { color: var(--muted); }
.mt-filters { display: flex; flex-wrap: wrap; gap: 0 1.25rem; font-size: 0.875rem; }
.mt-filters button { display: inline-flex; align-items: center; gap: 0.4rem; height: 2.5rem; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.mt-filters button b { font-weight: 400; color: var(--muted); }
.mt-filters button:hover { color: var(--ink); }
.mt-filters button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--ink); }

/* The map runs edge to edge; the mill's readings sit on it as a card. */
.mt-stage { position: relative; height: clamp(32rem, calc(100vh - 17rem), 50rem); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--tint); font-family: var(--sans); color: var(--ink); }
.mt-map { position: absolute; inset: 0; }
.mt-map .maplibregl-ctrl-group { border-radius: 0; box-shadow: none; border: 1px solid var(--rule-strong); }
.mt-map .maplibregl-ctrl-top-left { top: 0.4rem; left: 0.4rem; }
.mt-map .maplibregl-ctrl-attrib { font-size: 0.6875rem; }
.mt-pop .maplibregl-popup-content { padding: 0.35rem 0.6rem; border-radius: 0; box-shadow: none; background: var(--ink); color: var(--paper); font: 500 0.75rem/1.35 var(--sans); pointer-events: none; }
.mt-pop .maplibregl-popup-content b, .mt-pop .maplibregl-popup-content span { display: block; }
.mt-pop .maplibregl-popup-content span { font-weight: 400; opacity: 0.8; }
.mt-pop .maplibregl-popup-tip { display: none; }
.mt-legend { position: absolute; left: 1rem; bottom: 1rem; z-index: 2; padding: 0.6rem 0.8rem; border: 1px solid var(--rule-strong); background: var(--paper); font-size: 0.75rem; color: var(--muted); }
.mt-legend p { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem 0.85rem; }
.mt-legend p + p { margin-top: 0.3rem; }
.mt-legend .mt-asof { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--rule); }
.mt-legend b { font-weight: 500; color: var(--ink); }
.mt-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.mt-asof { color: var(--muted); }

.mt-glyph { flex: none; display: inline-block; width: 0.5625rem; height: 0.5625rem; border-radius: 50%; background: var(--c, var(--ink)); }
.mt-glyph.none { background: var(--paper); border: 1.5px solid var(--ink); }
.mt-glyph.cloud { width: 0.4375rem; height: 0.4375rem; background: var(--bar); border: 1px solid var(--muted); }
.mt-glyph.pause, .mt-glyph.play { width: 1rem; height: 1rem; margin: 0 -0.1875rem; border-radius: 0; background: var(--c, var(--ink)); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.mt-glyph.pause { --m: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%3E%3Cpath%20d='M5.4%204.5h3.4v11H5.4zM11.2%204.5h3.4v11h-3.4z'/%3E%3C/svg%3E"); }
.mt-glyph.play { --m: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%3E%3Cpath%20d='M6.5%204v12l9.6-6z'/%3E%3C/svg%3E"); }
.mt-check { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink); font-weight: 500; cursor: pointer; }
.mt-check input { width: 0.875rem; height: 0.875rem; margin: 0; padding: 0; accent-color: var(--ink); }
.mt-glyph.mine { background: var(--paper); border: 2px solid var(--brass); }
.mt-glyph.ask { width: auto; height: auto; border-radius: 0; background: none; color: var(--c, var(--ink)); font-weight: 700; font-size: 0.9375rem; line-height: 1; }
.mt-unlisted { margin-top: 0.6rem; padding: 0.6rem 0.75rem; font-size: 0.8125rem; line-height: 1.45; background: var(--tint); }
.mt-glyph.tri { width: 0; height: 0; border-radius: 0; background: none; border: 0.34rem solid transparent; }
.mt-glyph.tri.up { border-top-width: 0; border-bottom: 0.6rem solid var(--c); }
.mt-glyph.tri.down { border-bottom-width: 0; border-top: 0.6rem solid var(--c); }

.mt-panel { position: absolute; z-index: 3; top: 1rem; bottom: 1rem; right: 1rem; width: 24rem; padding: 1.1rem 1.25rem 1.25rem; overflow-y: auto; border: 1px solid var(--rule-strong); background: var(--paper); font-size: 0.9375rem; }
.mt-back { display: block; margin-bottom: 0.6rem; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 0.8125rem; cursor: pointer; }
.mt-back:hover { color: var(--ink); }
.mt-h3 { margin-top: 1.25rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--rule-strong); font-size: 0.8125rem; font-weight: 600; }
.mt-tabs { display: flex; gap: 0 1rem; margin-top: 0.9rem; border-bottom: 1px solid var(--rule-strong); font-size: 0.8125rem; }
.mt-tabs button { display: inline-flex; align-items: center; gap: 0.3rem; height: 2.25rem; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.mt-tabs button b { font-weight: 400; }
.mt-tabs button:hover { color: var(--ink); }
.mt-tabs button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.mt-pick { list-style: none; }
.mt-pick li { border-bottom: 1px solid var(--rule); }
.mt-pick button { display: grid; grid-template-columns: 0.9rem minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; width: 100%; padding: 0.5rem 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 0.875rem; text-align: left; cursor: pointer; }
.mt-pick b { display: block; font-weight: 500; }
.mt-pick small { display: block; font-size: 0.75rem; color: var(--muted); }
.mt-pick em { max-width: 8.5rem; font-style: normal; font-size: 0.8125rem; color: var(--text); text-align: right; white-space: nowrap; }
.mt-pick em b { font-size: 0.9375rem; font-weight: 500; color: var(--ink); }
.mt-pick button:hover b { text-decoration: underline; text-underline-offset: 0.2em; }
.mt-pick .mt-none { padding: 0.5rem 0; font-size: 0.875rem; color: var(--muted); }
.mt-name { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.mt-where { margin-top: 0.125rem; font-size: 0.8125rem; color: var(--muted); }
.mt-status { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.8rem; font-weight: 500; }
.mt-detail { margin-top: 0.2rem; font-size: 0.8125rem; color: var(--muted); }
.mt-now { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 0.9rem; padding: 0.7rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.mt-now dt { display: flex; flex-wrap: wrap; align-items: center; gap: 0.1rem 0.3rem; font-size: 0.75rem; color: var(--muted); }
.mt-now dd { margin-top: 0.15rem; font-size: 1.375rem; line-height: 1.2; }
.mt-now small { font-family: var(--sans); font-size: 0.75rem; color: var(--muted); }

.mt-pic { margin-top: 0.9rem; }
.mt-frame { position: relative; aspect-ratio: 1; background: var(--tint); overflow: hidden; }
.mt-frame img, .mt-rings { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.mt-base { object-fit: cover; transition: opacity 0.15s; }
.mt-mask { image-rendering: pixelated; }
.mt-frame [hidden] { display: none; }
.mt-rings circle { fill: none; stroke: #fff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.mt-rings .halo { stroke: rgba(0, 0, 0, 0.6); stroke-width: 3.5px; }
.mt-pic.loading .mt-base { opacity: 0.3; }
.mt-pic.loading .mt-mask, .mt-pic.loading .mt-rings, .mt-pic.failed .mt-mask, .mt-pic.failed .mt-rings { visibility: hidden; }
.mt-pic.failed .mt-base { visibility: hidden; }
.mt-load, .mt-fail { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; gap: 0.6rem; padding: 1rem; text-align: center; font-size: 0.8125rem; color: var(--text); }
.mt-pic.loading .mt-load, .mt-pic.failed .mt-fail { display: flex; }
.mt-load i, .mt-wait::after { width: 1rem; height: 1rem; border: 2px solid var(--rule-strong); border-top-color: var(--ink); border-radius: 50%; animation: mt-spin 0.8s linear infinite; }
@keyframes mt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mt-load i, .mt-wait::after { animation-duration: 2.4s; } }
.mt-wait::before { content: "Loading the map…"; position: absolute; z-index: 1; left: 2.6rem; top: 1.1rem; font-size: 0.8125rem; color: var(--text); }
.mt-wait::after { content: ""; position: absolute; z-index: 1; left: 1rem; top: 1.1rem; }
.mt-picbar { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-top: 0.45rem; font-size: 0.8125rem; color: var(--muted); }
.mt-picbar b { font-weight: 500; color: var(--ink); }
.mt-views { flex: none; display: inline-flex; gap: 0.75rem; }
.mt-views button { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 500; cursor: pointer; }
.mt-views button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -1.5px 0 var(--ink); }

.mt-chart { margin-top: 1.25rem; outline-offset: 4px; }
.mt-chart h3 { font-size: 0.875rem; font-weight: 600; }
.mt-plot { position: relative; margin-top: 0.5rem; }
.mt-plot svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.mt-plot .grid { stroke: var(--rule); stroke-width: 1; }
.mt-plot .axis { stroke: var(--rule-strong); stroke-width: 1; }
.mt-plot .month { stroke: var(--rule-strong); stroke-width: 1; }
.mt-plot .tick { fill: var(--muted); font: 0.6875rem var(--sans); font-variant-numeric: tabular-nums; }
.mt-plot .pt { fill: var(--muted); opacity: 0.55; }
.mt-plot .nil { fill: var(--paper); stroke: var(--muted); stroke-width: 1; }
.mt-plot .line { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.mt-plot .cloud { fill: var(--tint); }
.mt-plot .cloud-t { fill: var(--muted); font: 0.625rem var(--sans); }
.mt-plot .join { fill: none; stroke: var(--muted); stroke-width: 1.25; stroke-dasharray: 2 3; }
.mt-plot .end { fill: var(--ink); stroke: var(--paper); stroke-width: 2; }
.mt-plot .usual { stroke: var(--rule-strong); stroke-width: 1; }
.mt-plot .usual-t { fill: var(--muted); font: 0.6875rem var(--sans); }
.mt-plot .hov.pt { fill: var(--ink); opacity: 1; r: 3px; }
.mt-plot .hov.nil { stroke: var(--ink); }
.mt-plot .mark { fill: var(--brass); stroke: var(--paper); stroke-width: 2; }
.mt-plot .caret { fill: var(--brass); }
.mt-plot .hit { fill: transparent; cursor: pointer; }
.mt-tt { position: absolute; top: -1.6rem; padding: 0.2rem 0.5rem; background: var(--ink); color: var(--paper); font-size: 0.75rem; white-space: nowrap; pointer-events: none; }
.mt-tt b { margin-right: 0.5rem; font-weight: 500; }
.mt-key { display: flex; flex-wrap: wrap; gap: 0.15rem 0.9rem; margin-top: 0.4rem; font-size: 0.75rem; color: var(--muted); }
.mt-key span { display: inline-flex; align-items: center; gap: 0.35rem; }
.mt-key .k-line { display: inline-block; width: 1rem; height: 2px; background: var(--ink); }
.mt-key .k-pt { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--muted); opacity: 0.7; }
.mt-key .k-cloud { display: inline-block; width: 0.75rem; height: 0.6rem; background: var(--tint); border: 1px solid var(--rule); }
.mt-key .k-dot { display: inline-block; width: 5px; height: 5px; border-radius: 50%; border: 1px solid var(--muted); }

.mt-verdict { margin-top: 1.1rem; font-size: 0.9375rem; line-height: 1.45; }
.mt-verdict b { font-weight: 600; }
.mt-facts { margin-top: 1.1rem; border-top: 1px solid var(--rule); font-size: 0.8125rem; }
.mt-facts div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.mt-facts dt { color: var(--muted); }
.mt-facts a, .mt-how a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.mt-facts a:hover, .mt-how a:hover { color: var(--brass); border-color: currentColor; }
.mt-alert { margin-top: 1.1rem; }
.mt-alert label, .mt-add label { display: block; font-size: 0.875rem; font-weight: 500; }
.mt-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.mt-row input { flex: 1; min-width: 0; }
.mt button[type="submit"], .mt-stage button[type="submit"] { flex: none; height: 2.5rem; padding: 0 1rem; border: 1px solid var(--ink); border-radius: 0; background: var(--ink); color: var(--paper); font: inherit; font-size: 0.9375rem; font-weight: 500; cursor: pointer; }
.mt button[type="submit"]:hover, .mt-stage button[type="submit"]:hover { background: var(--brass-deep); border-color: var(--brass-deep); }
.mt-msg { min-height: 1.25rem; margin-top: 0.5rem; font-size: 0.8125rem; color: var(--muted); }

.mt-section { margin-top: 3.5rem; max-width: 46rem; }
.mt-section h2 { font-size: 1.3125rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; }
.mt-section > p { margin-top: 0.75rem; color: var(--text); }
.mt-add .mt-row { max-width: 34rem; margin-top: 1rem; }
.mt-more { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 500; cursor: pointer; border-bottom: 1px solid var(--rule-strong); }
.mt-more:hover { color: var(--brass); border-color: currentColor; }
.mt-terms { margin-top: 1rem; border-top: 1px solid var(--rule); }
.mt-terms div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; }
.mt-terms dt { display: flex; align-items: center; gap: 0.55rem; font-weight: 500; color: var(--ink); }
.mt-terms dt .mt-glyph { margin-left: 0.15rem; }
.mt-terms dd { color: var(--text); }
.mt-how .mt-src { font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 560px) { .mt-terms div { grid-template-columns: 1fr; gap: 0.15rem; } }

@media (max-width: 900px) {
  .mt-stage { height: auto; border-bottom: 0; background: none; }
  .mt-head input { width: 100%; }
  .mt-head > div:last-child { flex: 1 1 100%; }
  .mt-map { position: relative; height: min(26rem, 64vh); border-bottom: 1px solid var(--rule); }
  .mt-legend { position: static; margin: 0; border: 0; border-bottom: 1px solid var(--rule); padding: 0.75rem var(--gutter); }
  .mt-panel { position: static; width: auto; border: 0; padding: 1.25rem var(--gutter) 0; overflow: visible; }
  .mt-frame { max-width: 30rem; }
}
@media (max-width: 720px) {
  .mt { padding-top: 1.75rem; }
}
