/* Businesses of Night City. Builds on site.css. The directory sits on the street: listings separated by rules,
   each with its hours as a 24-hour strip and a needle at the city clock (the one flourish), lit in the shop-sign
   pink while it is open. The owner's books are a columnar accounting pad: green paper, navy ink, negatives in
   red parentheses, the result under a double rule. */
:root {
  --neon: #ff4f8b;
  --neon-soft: rgba(255, 79, 139, .38);
  --pad: #e4ecdf; --pad-rule: #c3d5bf; --pad-ink: #1c2a35; --pad-muted: #56666b; --pad-owed: #b3261e;
}

.biz-hero { margin-bottom: 18px; }
.biz-hero h1 { margin-bottom: .2em; }
.biz-hero .lede { color: var(--muted); max-width: 70ch; }
.small { font-size: .88rem; }

.biz-district { margin-top: 40px; }
.biz-district > h2 { padding-bottom: 8px; border-bottom: 2px solid var(--line); margin-bottom: 0; }
.biz-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); column-gap: 48px; }
.biz { padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.biz-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.biz h3 { font-size: 2rem; margin: 0; }
.biz h3 a { text-decoration: none; }
.biz h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.biz-what { color: var(--muted); margin: 6px 0 12px; }
.biz-hours { margin: 4px 0 12px; font-size: .92rem; color: var(--text); }

.biz-lamp { display: inline-flex; align-items: center; gap: 8px; font: 700 .88rem var(--body); color: var(--muted); white-space: nowrap; }
.biz-lamp::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--street-3); box-shadow: inset 0 0 0 1px var(--line); }
.biz-lamp.on { color: #ffd7e5; }
.biz-lamp.on::before { background: var(--neon); box-shadow: 0 0 10px var(--neon), 0 0 2px #fff; }
.biz-lamp.frozen { color: #ff8a8a; }
.biz-lamp.frozen::before { background: var(--signal); }
.biz-lamp.big { font-size: 1.05rem; margin-top: 6px; }

/* the 24-hour strip: the pink band is when it is open, the needle is the city clock now */
.biz-strip { position: relative; height: 16px; border-radius: 3px; background: var(--street-3); overflow: hidden; }
.biz-open { position: absolute; top: 0; bottom: 0; background: var(--neon-soft); border-left: 2px solid var(--neon); border-right: 2px solid var(--neon); }
.biz-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--text); }
.biz-ticks { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 3px; font-variant-numeric: tabular-nums; }

/* a price list with dotted leaders, like a board behind a counter */
.menu { list-style: none; margin: 0; padding: 0; max-width: 520px; }
.menu li { display: flex; align-items: baseline; padding: 3px 0; }
.menu li span:first-child { flex: 1; display: flex; align-items: baseline; }
.menu li span:first-child::after { content: ""; flex: 1; border-bottom: 1px dotted var(--line); margin: 0 8px; transform: translateY(-4px); }
.menu li.out { color: var(--muted); }
.menu li.out .money { color: var(--muted); }
.menu.wide { max-width: 640px; }

.biz-vacant { list-style: none; margin: 0; padding: 0; }
.biz-vacant li { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr 1.2fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.biz-vacant b { font: 800 1.25rem/1.1 var(--display); }
.biz-foot { margin-top: 32px; }

/* ---- the owner's books: a columnar pad ---- */
.ledger { background-color: var(--pad); color: var(--pad-ink); border-radius: var(--radius-doc); padding: 24px 26px 18px 52px; margin-bottom: 36px;
  background-image: linear-gradient(90deg, transparent 34px, #d98b8b 34px, #d98b8b 35px, transparent 35px),
                    repeating-linear-gradient(180deg, transparent 0 31px, var(--pad-rule) 31px 32px); }
.ledger h2, .ledger h3 { color: var(--pad-ink); }
.ledger .muted, .ledger .faint { color: var(--pad-muted); }
.ledger .money { color: var(--pad-ink); }
.ledger .biz-lamp { color: var(--pad-muted); }
.ledger .biz-lamp::before { background: #c9d6c5; box-shadow: inset 0 0 0 1px #9fb39b; }
.ledger .biz-lamp.on { color: #a3134c; }
.ledger .biz-lamp.on::before { background: var(--neon); box-shadow: 0 0 6px var(--neon); }
.ledger-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ledger-head h2 { margin: 0; font-size: 2.2rem; }
.ledger-head p { margin: 4px 0 0; color: var(--pad-muted); }
.ledger-balance { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 8px; }
.ledger-balance strong { font: 800 3rem/1 var(--display); font-variant-numeric: tabular-nums; }
.ledger-balance span { color: var(--pad-muted); }
.ledger-owed { border-left: 4px solid var(--pad-owed); padding: 6px 12px; background: rgba(179, 38, 30, .07); color: var(--pad-ink); }
.ledger .neg { color: var(--pad-owed); }
.ledger-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 10px 0; }
.ledger-table th, .ledger-table td { padding: 5px 8px; height: 32px; border-bottom: 1px solid var(--pad-rule); text-align: left; }
.ledger-table th { color: var(--pad-muted); font-weight: 600; font-size: .85rem; }
.ledger-table .num { text-align: right; font: 700 1.08rem var(--display); }
.ledger-table th.num { font: 600 .85rem var(--body); }
.ledger-table tr.total td { border-top: 2px solid var(--pad-ink); border-bottom: 3px double var(--pad-ink); font-weight: 700; }
.ledger-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 12px; }
.ledger-cols h3 { margin: 14px 0 0; font-size: 1.15rem; }
.ledger .tag.go { background: #2e6b45; color: #eef6ef; }
.ledger-journal { margin-top: 10px; }
.ledger-journal summary { cursor: pointer; font-weight: 700; padding: 6px 0; }
.ledger-journal ul { list-style: none; margin: 0; padding: 0; }
.ledger-journal li { display: grid; grid-template-columns: 150px 1fr 110px; gap: 12px; padding: 5px 0; border-bottom: 1px solid var(--pad-rule); font-size: .92rem; }
.ledger-journal .num { text-align: right; font: 700 1.02rem var(--display); }

/* staff review */
.biz-actions { display: grid; gap: 10px; margin: 14px 0; }
.biz-actions input { min-height: 34px; padding: 4px 9px; }
.biz-log { list-style: none; margin: 0 0 20px; padding: 0; }
.biz-log li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }

/* ---- finding one: the filters, the district map and the district list ---- */
.biz-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.biz-filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.biz-filters select { min-width: 200px; padding: 8px 10px; background: var(--street-3); color: var(--text); border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: .95rem; }
.biz-filters .chk { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: .95rem; padding-bottom: 8px; }
.biz-filters .chk input { accent-color: var(--neon); width: 18px; height: 18px; }
.biz-where { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; margin-top: 22px; align-items: start; }
.biz-map { width: 100%; height: auto; background: var(--street-2); border: 1px solid var(--line); border-radius: 8px; display: block; }
.biz-map circle { stroke-width: 1.5; }
.biz-map circle.on { fill: var(--neon); stroke: #fff; filter: drop-shadow(0 0 4px var(--neon)); }
.biz-map circle.off { fill: var(--muted); stroke: var(--street); }
.biz-map circle.vac { fill: none; stroke: var(--muted); stroke-dasharray: 2 2; }
.biz-map circle.dim { opacity: .22; }
.biz-map .dl { fill: var(--text); font: 800 15px var(--display); letter-spacing: .04em; text-transform: uppercase; paint-order: stroke; stroke: var(--street-2); stroke-width: 4px; }
.biz-map .dl.sel { fill: var(--neon); }
.biz-map a:hover .dl, .biz-map a:focus .dl { fill: #ffd7e5; text-decoration: underline; }
.biz-key { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.biz-key .k { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; margin-right: 2px; }
.biz-key .k.on { background: var(--neon); box-shadow: 0 0 6px var(--neon); }
.biz-key .k.off { background: var(--muted); }
.biz-key .k.vac { border: 1.5px dashed var(--muted); }
.biz-dlist { list-style: none; margin: 0; padding: 0; }
.biz-dlist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.biz-dlist li a { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.biz-dlist li a b { font: 800 1.35rem/1.05 var(--display); }
.biz-dlist li a:hover b { text-decoration: underline; }
.biz-dlist li.sel a b { color: var(--neon); }
.biz-dlist .nums { display: flex; flex-direction: column; align-items: flex-end; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.biz-district > h2 .small { font-family: var(--body); font-weight: 400; letter-spacing: 0; }
.biz-none { margin-top: 28px; }
.tag { display: inline-block; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font-size: .75rem; color: var(--muted); vertical-align: middle; }

@media (max-width: 760px) {
  .biz-where { grid-template-columns: 1fr; }
  .biz-filters select { min-width: 0; width: 100%; }
  .biz-filters label { flex: 1 1 100%; }
  .biz-list { grid-template-columns: 1fr; }
  .biz h3 { font-size: 1.7rem; }
  .biz-vacant li { grid-template-columns: 1fr 1fr; }
  .ledger { padding: 18px 16px 14px 30px; background-image: linear-gradient(90deg, transparent 16px, #d98b8b 16px, #d98b8b 17px, transparent 17px),
                    repeating-linear-gradient(180deg, transparent 0 31px, var(--pad-rule) 31px 32px); }
  .ledger-cols { grid-template-columns: 1fr; }
  .ledger-journal li { grid-template-columns: 1fr auto; }
  .ledger-journal li span:first-child { grid-column: 1 / -1; }
}
