/* The 700 block of State Street in 1926 (/history/700-block-state-street-1926/, src/pages/block-700.mjs, js/block-700.js).
   The block is drawn as a street: west-side storefronts left, east-side right, a road between. The year switch works
   without JS (radio :checked), the cards fall back to a ledger under the street. Every rule names a b7 class. */
.b7-sec .b7-h2 { font-size: var(--h2-sec); margin: 0 0 var(--sp-8); }
.b7-sec .b7-lede { margin: 0 0 var(--sp-24); max-width: 62ch; color: var(--ink-2); }
.b7-sec.b7-alt { background: var(--paper-2); }
.b7-sec .b7-more { margin: var(--sp-16) 0 0; font-size: .9rem; }
.b7-sec .b7-more a, .b7-story .b7-more a { color: var(--tile); font-weight: 600; }

/* trades */
.b7-tool, .b7-lasted { --c-food: var(--tile); --c-wear: var(--sea); --c-hard: var(--ink-2); --c-books: var(--dusk); --c-drug: var(--sage); --c-jewel: var(--sun); --c-office: var(--seaglass); --c-other: #b8a58a; }
.b7-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: var(--sp-4); vertical-align: 1px; background: var(--c-other); flex: none; }
.b7-dot.c-food, .b7-bar .c-food { background: var(--c-food); }
.b7-dot.c-wear, .b7-bar .c-wear { background: var(--c-wear); }
.b7-dot.c-hard, .b7-bar .c-hard { background: var(--c-hard); }
.b7-dot.c-books, .b7-bar .c-books { background: var(--c-books); }
.b7-dot.c-drug, .b7-bar .c-drug { background: var(--c-drug); }
.b7-dot.c-jewel, .b7-bar .c-jewel { background: var(--c-jewel); }
.b7-dot.c-office, .b7-bar .c-office { background: var(--c-office); }
.b7-dot.c-other, .b7-bar .c-other { background: var(--c-other); }

/* the year switch */
.b7-tool .b7-years { display: inline-flex; gap: var(--sp-4); margin: var(--sp-8) 0 var(--sp-16); padding: var(--sp-4); border: 0; border-radius: 999px; background: var(--paper-2); box-shadow: var(--shadow-1); }
.b7-years label { position: relative; cursor: pointer; }
.b7-years input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.b7-years span { display: block; padding: .55em 1.25em; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--ink-2); transition: background .2s var(--ease), color .2s var(--ease); }
.b7-years input:checked + span { background: var(--ink); color: #fffaf2; }
.b7-years input:focus-visible + span { outline: 2px solid var(--tile); outline-offset: 2px; }

/* what the block sold, for the chosen year */
.b7-tool .b7-mixes { min-height: 5.4rem; margin: 0 0 var(--sp-24); max-width: 760px; }
.b7-tool .b7-mix { display: none; }
.b7-tool .b7-mix[data-y="1926"] { display: block; }
.b7-bar { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; }
.b7-bar i { display: block; min-width: 4px; }
.b7-key { display: flex; flex-wrap: wrap; gap: var(--sp-4) var(--sp-16); margin: var(--sp-8) 0 0; padding: 0; list-style: none; font-size: .82rem; color: var(--ink-2); }
.b7-key b { color: var(--ink); margin-left: var(--sp-4); }
.b7-mix .b7-of { margin: var(--sp-4) 0 0; font-size: .75rem; color: var(--ink-3); }

/* which year the storefronts show: CSS alone (radio :checked), or the data-y JS sets for browsers without :has */
.b7-tool .b7-y { display: none; }
.b7-tool .b7-y[data-y="1926"] { display: grid; }
.b7-tool:is(:has(input[value="1895"]:checked), [data-y="1895"]) :is(.b7-y, .b7-mix)[data-y="1926"],
.b7-tool:is(:has(input[value="now"]:checked), [data-y="now"]) :is(.b7-y, .b7-mix)[data-y="1926"] { display: none; }
.b7-tool:is(:has(input[value="1895"]:checked), [data-y="1895"]) .b7-y[data-y="1895"],
.b7-tool:is(:has(input[value="now"]:checked), [data-y="now"]) .b7-y[data-y="now"] { display: grid; }
.b7-tool:is(:has(input[value="1895"]:checked), [data-y="1895"]) .b7-mix[data-y="1895"],
.b7-tool:is(:has(input[value="now"]:checked), [data-y="now"]) .b7-mix[data-y="now"] { display: block; }

/* the street */
.b7-tool .b7-grid { display: grid; gap: var(--sp-24); align-items: start; }
.b7-street { --road: 26px; }
.b7-street .b7-sides { display: grid; grid-template-columns: 1fr var(--road) 1fr; gap: var(--sp-8); margin: 0 0 var(--sp-8); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.b7-street .b7-sides span:first-child { text-align: right; grid-column: 1; }
.b7-street .b7-sides span:last-child { grid-column: 3; }
.b7-street .b7-cross { max-width: none; width: 100%; margin: 0; padding: var(--sp-8); border-radius: var(--r-tag); background: var(--ink); color: #fffaf2; text-align: center; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.b7-street .b7-rows { position: relative; display: grid; gap: var(--sp-8); margin: 0; padding: var(--sp-8) 0; list-style: none; }
.b7-street .b7-rows::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: var(--road); transform: translateX(-50%); background: linear-gradient(var(--sun-2) 55%, transparent 0) center / 2px 16px repeat-y, #3a434e; }
.b7-rows .b7-row { position: relative; display: grid; grid-template-columns: 1fr var(--road) 1fr; gap: var(--sp-8); align-items: stretch; }
.b7-rows .b7-road { display: block; }
.b7-rows .b7-gap { display: block; }
.b7-rows .b7-t { display: grid; align-content: start; gap: var(--sp-4); min-height: 6rem; padding: var(--sp-8) var(--sp-12); border-radius: var(--radius-sm); background: #fffaf2; box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.b7-rows .b7-w { text-align: right; }
.b7-rows .b7-t:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.b7-rows .b7-t:focus-visible { outline: 2px solid var(--tile); outline-offset: 2px; }
.b7-rows .b7-t[aria-current="true"] { background: #fff; box-shadow: 0 0 0 2px var(--tile), var(--shadow-2); }
.b7-t .b7-no { font-size: .68rem; font-weight: 700; letter-spacing: .1em; color: var(--tile); }
.b7-t .b7-y { gap: var(--sp-4); }
.b7-t .b7-y b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; font-weight: 600; line-height: 1.25; }
.b7-t .b7-y small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; font-size: .75rem; color: var(--ink-3); line-height: 1.3; }
.b7-t .b7-none b { font-weight: 400; font-size: .82rem; color: var(--ink-3); }
/* numbers with nothing listed that year sit back: same height, no card */
.b7-tool:has(input[value="1895"]:checked) .b7-t:has(.b7-none[data-y="1895"]),
.b7-tool:has(input[value="1926"]:checked) .b7-t:has(.b7-none[data-y="1926"]),
.b7-tool:has(input[value="now"]:checked) .b7-t:has(.b7-none[data-y="now"]) { background: transparent; box-shadow: none; border: 1px dashed var(--ink-3); opacity: .55; }

/* the open storefront */
.b7-tool .b7-panel:empty { display: none; }
.b7-card { padding: var(--sp-16); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); }
.b7-card:focus { outline: none; }
.b7-card h3 { margin: 0 0 var(--sp-12); font-family: var(--serif); font-weight: 400; font-size: 1.5rem; line-height: 1.15; }
.b7-card h3 small { display: block; margin-top: var(--sp-4); font-family: var(--sans); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.b7-card .b7-cy { display: grid; gap: var(--sp-8); padding: var(--sp-12) 0; border-top: 1px solid var(--line); }
.b7-card .b7-cy h4 { margin: 0; font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tile); }
.b7-card .b7-cy ul { display: grid; gap: var(--sp-12); margin: 0; padding: 0; list-style: none; }
.b7-card .b7-cy li { display: grid; gap: var(--sp-4); }
.b7-card .b7-cy p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.b7-card .b7-cy p b { color: var(--ink); }
.b7-card .b7-cy p a { color: inherit; }
.b7-card .b7-now p a b { color: var(--tile); }
.b7-clip { display: block; max-width: 100%; height: auto; border-radius: 4px; background: #fff; box-shadow: var(--shadow-1); }
.b7-clip.is-tan { box-shadow: none; }
.b7-card .b7-pg, .b7-card .b7-src { font-size: .75rem; color: var(--ink-3); }
.b7-card a.b7-pg { text-decoration: underline; text-decoration-color: var(--line); }

/* the ledger: every card, shown without JS; with JS one card at a time in the panel */
.b7-tool .b7-cards { display: grid; gap: var(--sp-16); margin-top: var(--sp-32); }
.b7-cards .b7-ledger-h { margin: 0; font-size: var(--h2-card); }
.b7-tool.b7-on .b7-cards { display: none; }
.b7-rows .b7-prow { position: relative; z-index: 1; display: block; }
.b7-rows .b7-prow .b7-panel { display: block; }

@media (min-width: 700px) {
  .b7-street { --road: 44px; }
  .b7-rows .b7-t { min-height: 5.1rem; }
  .b7-card { padding: var(--sp-20); }
  .b7-tool .b7-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .b7-cards .b7-ledger-h { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .b7-tool .b7-grid { grid-template-columns: minmax(0, 1fr) 380px; }
  .b7-tool .b7-panel { position: sticky; top: var(--sp-96); max-height: calc(100vh - 120px); overflow: auto; border-radius: var(--radius); }
  .b7-street { --road: 64px; }
}

/* what lasted */
.b7-lasted { display: grid; gap: var(--sp-16); }
.b7-lasted .b7-l { display: grid; align-content: start; gap: var(--sp-12); padding: var(--sp-16); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-1); }
.b7-lasted .b7-l h3 { margin: 0; font-size: var(--h3-card); font-family: var(--serif); font-weight: 400; }
.b7-lasted .b7-l p { margin: 0; color: var(--ink-2); font-size: 1rem; }
.b7-lasted .b7-l a { color: var(--tile); font-weight: 600; }
.b7-strip { display: grid; gap: var(--sp-8); }
.b7-strip figure { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: var(--sp-8); align-items: center; margin: 0; }
.b7-strip figcaption { font-size: .75rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); }
@media (min-width: 760px) {
  .b7-lasted { grid-template-columns: 1fr 1fr; gap: var(--sp-24); }
  .b7-lasted .b7-l { padding: var(--sp-20); }
}

/* from above */
.b7-two { max-width: 1040px; }
.b7-air { margin: 0; }
.b7-air img { width: 100%; height: auto; aspect-ratio: 1000 / 660; object-fit: cover; background: var(--paper-3); }

/* the ads */
.b7-ads { display: grid; gap: var(--sp-16); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; }
.b7-ads .b7-ad { display: grid; gap: var(--sp-8); margin: 0; padding: var(--sp-16); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-1); }
.b7-ads .b7-ad .b7-clip { box-shadow: none; margin: 0 auto; }
.b7-ads .b7-ad figcaption { font-size: .75rem; color: var(--ink-3); }
.b7-ads .b7-ad figcaption a { color: inherit; }

/* header, wide screens: 727 through the three books beside the title */
.b7-ph .b7-hero { display: none; }
@media (min-width: 960px) {
  .b7-ph > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: var(--sp-48); }
  .b7-ph > .wrap > * { grid-column: 1; }
  .b7-ph > .wrap > .ph-top { grid-column: 2; grid-row: 1; justify-self: end; }
  .b7-ph > .wrap > .b7-hero { display: grid; grid-column: 2; grid-row: 2 / span 5; align-self: end; gap: var(--sp-12); padding: var(--sp-20); border-radius: var(--radius); background: #fffaf2; box-shadow: var(--shadow-2); }
  .b7-hero .b7-hero-h { margin: 0; font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; }
  .b7-hero figure { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: var(--sp-8); align-items: center; margin: 0; }
  .b7-hero figcaption { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tile); }
  .b7-hero .b7-clip { width: 100%; height: auto; }
  .b7-hero .b7-hero-k { margin: var(--sp-4) 0 0; font-size: .82rem; color: var(--ink-2); }
  .b7-hero .b7-hero-k a { color: var(--tile); font-weight: 600; }
}
