/* Threshold
   Gallery, Atelier, Hub — Morningwood, Los Santos.
   Gray digital brutalism inside a Windows 98 window.
   The chrome is beveled and gray. The document inside uses black rules.
   The title bar is the only gradient. */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: #808080;
  color: #000;
  font-family: Verdana, Tahoma, sans-serif;
  font-size: 12px;
  line-height: 1.35;
}

.desktop {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
  width: max-content;
  min-width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 16px 48px;
}

.window {
  width: 760px;
  flex: 0 0 760px;
  margin: 0;
  padding: 3px;
  background: #c0c0c0;
  border-radius: 0;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #fff,
    inset -2px -2px grey,
    inset 2px 2px #dfdfdf;
}

.title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 3px 3px 3px 4px;
  background: linear-gradient(90deg, #2f2f2f, #6a6a6a);
  color: #fff;
}

.title-bar-text {
  overflow: hidden;
  font-family: "Microsoft Sans Serif", Tahoma, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  white-space: nowrap;
}

.title-bar-controls {
  display: flex;
  flex-shrink: 0;
}

.title-bar-controls button {
  width: 16px;
  height: 14px;
  min-width: 16px;
  min-height: 14px;
  margin-left: 2px;
  padding: 0;
  font-size: 9px;
  line-height: 12px;
}

.menu-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px 2px 2px;
  background: #c0c0c0;
}

.menu-bar a,
.menu-bar button {
  min-width: 0;
  padding: 3px 10px 4px;
  background: #c0c0c0;
  color: #000;
  font-family: "Microsoft Sans Serif", Tahoma, sans-serif;
  font-size: 11px;
  line-height: 16px;
  text-decoration: none;
  border-radius: 0;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #fff,
    inset -2px -2px grey,
    inset 2px 2px #dfdfdf;
}

.menu-bar a:link,
.menu-bar a:visited,
.menu-bar button {
  color: #000;
}

.menu-bar a:hover,
.menu-bar button:hover {
  background: #dfdfdf;
}

.menu-bar a[aria-current="page"],
.menu-bar button[aria-current="page"] {
  background: #4a4a4a;
  color: #fff;
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px grey;
}

.menu-bar a[aria-current="page"]:link,
.menu-bar a[aria-current="page"]:visited,
.menu-bar a[aria-current="page"]:hover,
.menu-bar button[aria-current="page"]:hover {
  color: #fff;
  background: #4a4a4a;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 8px;
  padding-top: 6px;
  border-top: 2px solid #000;
}

.section-head h2 {
  margin: 0;
  padding: 0;
  border: 0;
}

.section-head button {
  flex-shrink: 0;
}

button[aria-pressed="true"] {
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px grey;
}

.admin-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  border-top: 2px solid #000;
}

.admin-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #000;
}

.sunken-panel {
  margin: 8px;
  padding: 12px 12px 14px;
  background: #fff;
  border-radius: 0;
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px grey,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #0a0a0a;
}

.kicker {
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 2px solid #000;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 2px;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.sub {
  margin: 0 0 10px;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  letter-spacing: 0.04em;
}

h2 {
  margin: 18px 0 8px;
  padding-top: 6px;
  border-top: 2px solid #000;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h3 {
  margin: 6px 0 2px;
  font-size: 14px;
  line-height: 1.2;
}

p {
  margin: 0 0 8px;
}

.lede {
  max-width: 62ch;
}

a:link {
  color: #222;
}

a:visited {
  color: #555;
}

a:active {
  color: #000;
}

.sunken-panel a {
  text-decoration: underline;
}

.ticker {
  margin: 10px 0;
  padding: 4px 8px;
  border: 2px solid #000;
  background: #efefef;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

.now {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border: 2px solid #000;
  background: #f4f4f4;
}

.ads-left,
.ads-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 140px;
  width: 140px;
  align-self: stretch;
  min-height: 240px;
}

.ad-slot {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  min-height: 96px;
  padding: 8px 6px;
  overflow: auto;
  background: #c0c0c0;
  border-radius: 0;
  color: #000;
  font-family: "Microsoft Sans Serif", Tahoma, sans-serif;
  font-size: 11px;
  line-height: 1.3;
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px grey,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #0a0a0a;
}

.ad-slot .ads-label {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.ad-slot a,
.ad-slot strong {
  color: #000;
  font-weight: 700;
  text-decoration: underline;
}

.ad-slot strong {
  text-decoration: none;
}

.ad-slot p {
  margin: 4px 0 0;
}

.num {
  font-family: "Courier New", Courier, monospace;
  font-size: 28px;
  line-height: 0.9;
}

.meta,
.price,
.colophon,
legend,
.kicker,
.num,
.frame {
  font-family: "Courier New", Courier, monospace;
}

.meta,
.colophon {
  margin: 0;
  font-size: 11px;
}

.stack {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid #000;
}

.stack li {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #000;
}

.stack.index li,
.stack.calls li {
  grid-template-columns: 40px 1fr;
}

.stack.calls .num {
  font-size: 16px;
}

.stack strong {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 12px;
}

th,
td {
  padding: 5px 6px;
  border: 1px solid #000;
  text-align: left;
  vertical-align: top;
}

th {
  background: #d4d4d4;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.catalog {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.catalog article {
  padding: 8px;
  border: 2px solid #000;
  background: #fff;
}

.frame {
  display: flex;
  align-items: flex-end;
  height: 90px;
  padding: 4px 6px;
  overflow: hidden;
  background: #c8c8c8;
  border: 2px solid #000;
  color: #000;
  font-size: 22px;
  line-height: 1;
}

.frame img {
  display: block;
  width: 100%;
  height: 82px;
  object-fit: contain;
  object-position: center bottom;
  background: #c8c8c8;
}

.item-open,
.item-open:active {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0 0 6px;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  box-shadow: none;
}

.item-open h3 {
  margin: 6px 0 0;
  color: inherit;
}

.focus-frame {
  align-items: center;
  justify-content: center;
  height: 240px;
  margin-bottom: 8px;
  font-size: 12px;
  font-family: "Courier New", Courier, monospace;
}

.focus-frame img {
  height: 232px;
}

.window.popup {
  position: fixed;
  z-index: 5;
  top: 64px;
  left: 0;
  right: 0;
  width: 420px;
  max-width: calc(100% - 24px);
  flex: none;
  margin: 0 auto;
}

.popup .window-body {
  padding: 0;
}

.popup .sunken-panel {
  margin: 8px;
}

.window.is-behind > .title-bar {
  background: linear-gradient(90deg, #8a8a8a, #c0c0c0);
  color: #000;
}

.popup-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.price {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 16px;
  align-items: start;
}

.contact-grid h2 {
  margin-top: 0;
}

address {
  margin: 0 0 8px;
  font-style: normal;
  font-weight: 700;
}

.map-block {
  padding: 8px;
  border: 2px solid #000;
  background: #f4f4f4;
}

fieldset {
  margin: 0;
  padding: 10px;
  border: 2px solid #000;
}

legend {
  padding: 0 4px;
  font-size: 12px;
}

.form-row {
  margin-bottom: 8px;
}

.form-row label {
  display: block;
  margin-bottom: 2px;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 11px;
}

input[type="date"],
input[type="email"],
input[type="file"],
input[type="password"],
input[type="text"],
input[type="url"],
select,
textarea {
  width: 100%;
  padding: 4px;
  border: none;
  border-radius: 0;
  background: #fff;
  color: #000;
  font: 12px Verdana, Tahoma, sans-serif;
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px grey,
    inset -2px -2px #dfdfdf,
    inset 2px 2px #0a0a0a;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

button,
input[type="submit"] {
  min-width: 75px;
  min-height: 23px;
  padding: 0 12px;
  border: none;
  border-radius: 0;
  background: #c0c0c0;
  color: #000;
  font: 11px "Microsoft Sans Serif", Tahoma, sans-serif;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #fff,
    inset -2px -2px grey,
    inset 2px 2px #dfdfdf;
}

button:active,
input[type="submit"]:active {
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px grey;
}

button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: 1px dotted #000;
  outline-offset: 2px;
}

button:disabled,
.title-bar-controls button:disabled {
  color: #000;
  opacity: 1;
}

.confirm:not([hidden]) {
  margin: 8px 0 0;
  padding: 6px 8px;
  border: 2px solid #000;
  background: #e6e6e6;
  font-weight: 700;
}

.colophon {
  margin-top: 12px;
}

/* Info blocks only. Solid pure hues, no tint and no alpha.
   Each block gets its own hue from script.js. */
.info-block,
.ticker.info-block,
.now.info-block,
.map-block.info-block,
.stack li.info-block,
.catalog article.info-block,
.confirm.info-block,
tr.info-block td {
  background: hsl(var(--hue, 0), 100%, 50%);
  border-color: hsl(var(--hue, 0), 100%, 50%);
  color: var(--ink, #000);
}

.info-block a:link,
.info-block a:visited,
.info-block a:active {
  color: var(--ink, #000);
}

.status-bar {
  display: flex;
  gap: 2px;
  margin: 0 2px 2px;
}

.status-bar-field {
  flex: 1 1 auto;
  margin: 0;
  padding: 2px 4px;
  overflow: hidden;
  font-family: "Microsoft Sans Serif", Tahoma, sans-serif;
  font-size: 11px;
  white-space: nowrap;
  box-shadow: inset -1px -1px #dfdfdf, inset 1px 1px grey;
}

.status-bar-field:last-child {
  flex: 0 0 auto;
}

button.status-bar-field {
  min-width: 75px;
  min-height: 0;
  padding: 2px 8px;
  background: #c0c0c0;
  color: #000;
  font: 11px "Microsoft Sans Serif", Tahoma, sans-serif;
  text-align: left;
  box-shadow:
    inset -1px -1px #0a0a0a,
    inset 1px 1px #fff,
    inset -2px -2px grey,
    inset 2px 2px #dfdfdf;
}

button.status-bar-field:active {
  box-shadow:
    inset -1px -1px #fff,
    inset 1px 1px #0a0a0a,
    inset -2px -2px #dfdfdf,
    inset 2px 2px grey;
}
