/* =========================================================================
   I ♥ CAPITALISM — a 1999 dot-com superstore for defunct corporate swag.
   Web-safe colors, beveled borders, marquees. Best viewed at 800×600.
   ========================================================================= */

:root{
  --navy:#000080; --teal:#008080; --silver:#c0c0c0; --gold:#ffcc00;
  --link:#0000cc; --ink:#1a1a1a; --cream:#fffdf5; --red:#cc0000;
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  font:14px/1.5 Arial, Helvetica, sans-serif; color:var(--ink);
  background:var(--teal);
  background-image:repeating-linear-gradient(45deg,#0a8a8a 0 2px,#008080 2px 8px);
}
a{color:var(--link); text-decoration:underline; cursor:pointer}
/* No visited-link recolor: a purple :visited (the old --vlink) turned unreadable
   on the navy footer/nav. Links now keep their normal contextual color after a
   click; each context's own rule (footer #9cf, etc.) still applies to :visited. */
/* :hover only on real pointers — on touch a :hover style traps the first tap
   (iOS shows the hover state instead of firing the click), so a link would need
   two taps to navigate. Same reason as the .secdrop-list gating further down.
   `html:not(.touch)` is belt-and-suspenders for iOS "Request Desktop Website",
   which lies and makes (hover:hover) match on a touch device; app.js tags
   <html class="touch"> from the still-present touch hardware so hover bows out. */
@media (hover:hover){ html:not(.touch) a:hover{color:var(--red)} }
img{border:0}

.wrap{max-width:880px; margin:0 auto; background:var(--cream);
      border:2px outset var(--silver); box-shadow:0 0 0 4px rgba(0,0,0,.25)}

/* ---- masthead ---- */
header{background:var(--navy); color:#fff; padding:10px 14px;
       display:flex; align-items:center; gap:14px; flex-wrap:wrap;
       border-bottom:3px ridge var(--gold)}
.brand{font:bold 26px "Times New Roman", Georgia, serif; white-space:nowrap; cursor:pointer;
       display:block; color:#fff; text-decoration:none}
.brand:visited{color:#fff}
.brand .h{color:#ff3344}
.brand small{display:block; font:italic 11px Arial; color:#cfe}
.search{margin-left:auto; display:flex; gap:4px; align-items:center}
.search input{border:2px inset var(--silver); padding:3px 5px; font:13px Arial; width:150px}
/* appearance:none keeps the flat beveled look on iOS (the search "Go!" is a
   <button class="btn">; without it Safari draws its native rounded pill). */
.btn{appearance:none; -webkit-appearance:none; border-radius:0;
     font:bold 12px Arial; padding:3px 9px; border:2px outset var(--silver);
     background:var(--silver); color:#000; cursor:pointer; text-decoration:none; display:inline-block}
.btn:visited{color:#000}
.btn:active{border-style:inset}
.btn.primary{background:var(--gold); color:#7a0000}
.btn.big{font-size:14px; padding:7px 14px}
.userbox{display:flex; align-items:center; gap:12px}
/* total visitors — pinned to the masthead's upper right on every screen */
.visitors{display:inline-flex; align-items:center; gap:5px;
          color:var(--gold); font:bold 11px Arial; white-space:nowrap}
.visitors .hitcount{font:bold 13px "Courier New",monospace; background:#000; color:#0f0;
                    padding:2px 5px; letter-spacing:2px; border:2px inset #444}

/* ---- top nav ---- */
nav.top{background:#003; padding:6px 10px; border-bottom:2px groove var(--silver);
        display:flex; align-items:center}
nav.top a{color:#9cf; font-weight:bold; margin-right:2px; padding:2px 9px;
          text-decoration:none; border-radius:2px}
nav.top a[data-nav="about"]{margin-left:auto; margin-right:0}  /* push About to the far right on desktop */
nav.top a.on{background:var(--gold); color:#003}
@media (hover:hover){ html:not(.touch) nav.top a:hover{background:var(--gold); color:#003} }

/* ---- layout ---- */
.cols{display:flex; gap:0}
aside{width:180px; flex:none; background:#eef3ee; border-right:2px groove var(--silver); padding:12px 10px}
main{flex:1; padding:14px 16px; min-width:0}
.box{border:2px ridge var(--silver); background:#fff; margin-bottom:14px}
.box h3{margin:0; background:var(--navy); color:#fff; font:bold 12px Arial;
        padding:5px 8px; text-transform:uppercase; letter-spacing:.5px}
.box ul{list-style:none; margin:0; padding:6px 8px}
.box li{padding:2px 0; border-bottom:1px dotted #bbb}
.box li:last-child{border-bottom:0}
.box li a{text-decoration:none; font-size:13px}
.box li a.on{color:var(--red); font-weight:bold}
/* Sectors: custom Win95 combobox (.secdrop). The plain link list (.seccrawl)
   stays in the DOM for crawlers but is visually hidden. */
.seccrawl{display:none}
.secdrop{position:relative; margin:8px; font:bold 12px Arial,Helvetica,sans-serif}
/* closed control: a sunken white field with an attached raised arrow button */
/* appearance:none is essential — without it iOS Safari throws away the custom
   styling and renders its native rounded-pill button chrome (so the combobox
   "doesn't look like desktop"), and its odd hit/layout behaviour makes the tap
   feel dead. Reset to a plain flat clickable box. */
.secdrop-btn{appearance:none; -webkit-appearance:none; border-radius:0; margin:0;
             display:flex; align-items:stretch; box-sizing:border-box; width:100%;
             padding:0; cursor:pointer; font:inherit; text-align:left; color:var(--navy);
             background:#fff; border:2px inset var(--silver); touch-action:manipulation}
.secdrop-btn:focus{outline:2px dotted var(--gold); outline-offset:1px}
.secdrop-label{flex:1; min-width:0; overflow:hidden; white-space:nowrap;
               text-overflow:ellipsis; text-align:left; padding:4px 8px}
.secdrop-arrow{flex:none; display:flex; align-items:center; justify-content:center;
               width:18px; border:2px outset var(--silver);
               background:linear-gradient(180deg,#f2f2f2,#cacaca)}
.secdrop-arrow::after{content:""; width:0; height:0;
               border-left:4px solid transparent; border-right:4px solid transparent;
               border-top:5px solid var(--navy)}
.secdrop[data-open="true"] .secdrop-arrow{border-style:inset;
               background:linear-gradient(180deg,#cacaca,#f2f2f2)}
/* open popup: a bordered list that floats over the page like a real combobox */
.secdrop-list{position:absolute; z-index:50; top:calc(100% - 1px); left:0;
              min-width:100%; width:max-content; max-width:min(260px,calc(100vw - 24px));
              margin:0; padding:1px; list-style:none; background:#fff;
              border:2px outset var(--silver); max-height:60vh; overflow-y:auto;
              box-shadow:3px 3px 0 rgba(0,0,0,.4)}
.secdrop-list li{position:relative; padding:5px 22px 5px 9px; font:bold 12px Arial;
                 color:var(--navy); cursor:pointer; white-space:nowrap;
                 overflow:hidden; text-overflow:ellipsis; touch-action:manipulation}
.secdrop-list li.on::after{content:"\2713"; position:absolute; right:7px; font-weight:bold}
/* classic single navy highlight bar follows the mouse / keyboard cursor.
   :hover is gated to real pointers: on touch, a :hover style traps the first
   tap (iOS dispatches the hover state instead of the click), so a sector would
   need two taps to navigate. The extra html:not(.touch) guard covers iOS
   "Request Desktop Website" (it makes (hover:hover) match on a touch device).
   .kbd (keyboard/programmatic) highlights everywhere. */
.secdrop-list li.kbd{background:var(--navy); color:#fff}
@media (hover:hover){ html:not(.touch) .secdrop-list li:hover{background:var(--navy); color:#fff} }
.counter{font:bold 16px "Courier New", monospace; background:#000; color:#0f0;
         padding:4px 6px; letter-spacing:3px; text-align:center; border:2px inset #444}
.badge{width:88px; height:31px; margin:4px 2px 0; font:bold 10px Arial;
       color:#fff; text-align:center; line-height:1.1; border:1px solid #000;
       display:inline-flex; align-items:center; justify-content:center; text-decoration:none}
.badge:visited{color:#fff}

/* ---- page heads ---- */
.pagetitle{font:bold 20px "Times New Roman", serif; color:var(--navy); margin:0 0 2px}
.crumbs{font-size:12px; color:#555; margin-bottom:12px}
.crumbs b{color:#000}
.count{font-size:12px; color:#777; margin:0 0 10px}
.count.notice{color:#7a4a00; background:#fff7e0; border:1px solid #e8c97a; padding:6px 8px}
.count.notice b{color:#7a0000}

/* ---- product grid ---- */
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px}
.card{border:2px outset var(--silver); background:#fff; padding:8px; text-align:center; position:relative; display:flex; flex-direction:column}
.card .thumb{height:96px; display:flex; align-items:center; justify-content:center; overflow:hidden; cursor:pointer; text-decoration:none}
.card .thumb img,.card .thumb svg{max-width:100%; max-height:96px}
.card .pname{font:bold 12px Arial; margin:6px 0 2px; min-height:30px}
.card .pname a{text-decoration:none; color:var(--navy)}
.card .price{color:var(--red); font:bold 15px Arial}
/* Vintage card corner badge: auction (price = current bid) vs buy-now (fixed). */
.card .vkind{position:absolute; top:0; left:0; z-index:1; font:bold 9px/1.5 Arial, sans-serif;
  text-transform:uppercase; letter-spacing:.03em; padding:1px 5px; border:1px solid; border-top:0; border-left:0}
.card .vkind.auction{background:#fff3cd; color:#8a5a00; border-color:#d6a93c}
.card .vkind.fixed{background:#e8f0e8; color:#2c6e2c; border-color:#9cc39c}
.card .add{margin-top:auto; width:100%; font:bold 11px Arial; padding:4px; text-align:center;
           border:2px outset var(--silver); background:#ffe9a8; cursor:pointer; text-decoration:none;
           color:#000; display:block}
.card .add:visited{color:#000}
.card .add:active{border-style:inset}
/* third-party search links look cooler/quieter than the gold "buy" button */
.card .add.search{background:#dbe7f3; font-weight:bold}
.new{position:absolute; top:4px; right:4px; background:var(--red); color:#fff;
     font:bold 9px Arial; padding:1px 4px; transform:rotate(8deg)}

/* ---- official / vintage tabs on the company page ----
   Pure-CSS tabs: two radios drive which pane shows (no JS, works server-rendered).
   The retro folder-tab look: the active tab goes white, adopts the navy border,
   and pulls down 2px to sit on top of the content's top rule. */
.merchtabs{margin-top:18px}
.merchtabs > .mtab-cb{position:absolute; width:1px; height:1px; opacity:0; pointer-events:none}
.tabbar{display:flex; flex-wrap:wrap; border-bottom:2px solid var(--navy); margin-bottom:14px}
.tabbar .tab{font:bold 13px Arial; padding:7px 16px; margin-right:3px; cursor:pointer;
             border:2px outset var(--silver); border-bottom:0; background:var(--silver);
             color:var(--navy); user-select:none}
.tabbar .tab:hover{background:#e9e9e9}
#mtab-official:checked ~ .tabbar .tab[for="mtab-official"],
#mtab-vintage:checked ~ .tabbar .tab[for="mtab-vintage"]{
  background:#fff; color:#000; border:2px solid var(--navy); border-bottom:2px solid #fff;
  margin-bottom:-2px}
.mtab-cb:focus-visible ~ .tabbar .tab[for="mtab-official"],
.mtab-cb:focus-visible ~ .tabbar .tab[for="mtab-vintage"]{outline:2px dotted var(--navy); outline-offset:1px}
.tabpane{display:none}
#mtab-official:checked ~ .pane-official,
#mtab-vintage:checked ~ .pane-vintage{display:block}
/* "Official Store »" CTA at the top of the Official Store tab (moved out of the header). */
.merch-storelink{margin-bottom:14px}
/* Footer note under the Official Store catalog: we don't index the full store, click out. */
.storenote{margin-top:14px; font-size:12px; font-style:italic; color:#666}

/* ---- vintage & collectible finds (secondhand resale links) ----
   A sepia/parchment tint so the resale buttons read as "shop the resale market",
   not "buy new". .vbtn mirrors the beveled .btn look in a vintage palette. */
.vintage{margin:0}
.vgrid{display:flex; flex-wrap:wrap; gap:8px}
.vbtn{appearance:none; -webkit-appearance:none; border-radius:0;
      font:bold 12px Arial; padding:6px 12px; border:2px outset #cdb892;
      background:#f3e9d2; color:#5a3e1b; cursor:pointer; text-decoration:none;
      display:inline-block}
.vbtn:visited{color:#5a3e1b}
.vbtn:hover{background:#efe0bf}
.vbtn:active{border-style:inset}

/* ---- merch pre-order form (shown when a company has no real merch) ---- */
.preorder{border:2px ridge var(--silver); background:#fff; padding:12px 14px; max-width:460px}
.preorder-label{display:block; font:bold 13px Arial; color:var(--navy); margin:0 0 8px}
.preorder-row{display:flex; gap:6px; flex-wrap:wrap; align-items:center}
.preorder-email{flex:1; min-width:160px; border:2px inset var(--silver);
                padding:5px 6px; font:13px Arial}
.preorder-email:disabled{background:#eee; color:#666}
.preorder .btn[disabled]{opacity:.6; cursor:default}
/* honeypot — off-screen (not display:none, so bots still fill it) */
.preorder-hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}
.preorder-msg{margin:8px 0 0; font:bold 12px Arial}
.preorder-msg.ok{color:#0a6b2e}
.preorder-msg.err{color:var(--red)}

/* ---- "Submit a Suggestion" form (/suggest) ---- */
.suggest{max-width:560px; margin-top:14px}
.suggestbox{border:2px ridge var(--silver); background:#fff; padding:14px 16px}
.suggest-label{display:block; font:bold 13px Arial; color:var(--navy); margin:12px 0 6px}
.suggest-label:first-child{margin-top:0}
.suggest-label .opt{font-weight:normal; color:#666; font-size:11px}
.suggest-label .req{font-weight:normal; color:var(--red)}
.suggest-notes{display:block; width:100%; min-height:120px; resize:vertical;
               border:2px inset var(--silver); padding:8px; font:13px/1.5 Arial; color:var(--ink)}
.suggest-email{display:block; width:100%; border:2px inset var(--silver);
               padding:6px 7px; font:13px Arial; color:var(--ink)}
.suggest-notes:disabled,.suggest-email:disabled{background:#eee; color:#666}
.suggest-actions{margin-top:14px}
.suggest .btn[disabled]{opacity:.6; cursor:default}
/* honeypot — off-screen (not display:none, so bots still fill it) */
.suggest-hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}
.suggest-msg{margin:10px 0 0; font:bold 12px Arial}
.suggest-msg.ok{color:#0a6b2e}
.suggest-msg.err{color:var(--red)}

/* ---- "Your Ad Here" advertising contact (sidebar #rentbox + modal) ---- */
/* Sidebar: the pitch sits inside the yellow "FOR RENT" placeholder (normal weight
   overrides the box's bold), then a full-width "Contact us" button below it. */
#rentbox .adform-pitch{margin:8px 0 0; font:normal 11px/1.4 Arial; color:#333}
#rentbox .btn{width:100%; margin-top:8px}

/* The form itself lives in the #ad-modal <dialog> (hidden until opened). Native
   <dialog> centers it + dims the page; we paint it like a Win95 window. */
dialog.ad-modal{
  padding:0; border:2px outset var(--silver); background:var(--cream); color:var(--ink);
  width:min(94vw, 420px); max-height:90vh; box-shadow:0 0 0 4px rgba(0,0,0,.25);
}
dialog.ad-modal::backdrop{background:rgba(0,0,40,.5)}
.ad-modal-bar{
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  background:linear-gradient(90deg,var(--navy),#1084d0); color:#fff;
  font:bold 13px Arial; padding:5px 6px 5px 9px;
}
.ad-modal-x{
  background:var(--silver); border:2px outset var(--silver); color:#000;
  font:bold 12px Arial; line-height:1; padding:1px 7px; cursor:pointer; flex:none;
}
.ad-modal-x:active{border-style:inset}
.ad-modal-body{padding:14px 16px}
.ad-modal .adform-pitch{margin:0 0 12px; font-size:13px; line-height:1.45; text-align:left; color:var(--ink)}
.adform-label{display:block; font:bold 13px Arial; color:var(--navy); margin:10px 0 5px}
.adform-label .opt{font-weight:normal; color:#666; font-size:11px}
.adform-email,.adform-message{display:block; width:100%; border:2px inset var(--silver);
  padding:6px 7px; font:13px Arial; background:#fff}
.adform-message{resize:vertical; min-height:72px}
.adform-email:disabled,.adform-message:disabled{background:#eee; color:#666}
.ad-modal-actions{display:flex; gap:8px; justify-content:flex-end; margin-top:16px}
.ad-modal-actions .btn[disabled]{opacity:.6; cursor:default}
.adform-hp{position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden}
.adform-status{margin:12px 0 0; font:bold 12px Arial; line-height:1.35}
.adform-status.ok{color:#0a6b2e}
.adform-status.err{color:var(--red)}

/* ---- no iOS focus-zoom on mobile ---- */
/* iOS Safari zooms the whole page when you focus a text field whose font is
   under 16px. Bump every focusable field to 16px on touch devices so tapping one
   doesn't yank the viewport — desktop keeps the smaller retro sizing. Scoped to
   (pointer:coarse) so pinch-zoom stays enabled (unlike a maximum-scale hack).
   Placed after the base field rules so it wins on source order. */
@media (pointer: coarse){
  .search input, .preorder-email, .suggest-notes, .suggest-email,
  .adform-email, .adform-message{ font-size:16px }
}

/* ---- companies directory ---- */
/* "Official merch stores only" — a pure-CSS filter. The real <input> is visually
   hidden (still focusable + screen-reader labelled); the label paints a Win95
   inset checkbox. When checked, :checked ~ sibling rules hide every card without
   [data-store] and swap the count line. No JS, so it works on the prerendered
   static HTML and survives SPA re-renders unchanged. Sibling combinators key off
   the DOM, so the absolutely-positioned input still counts as a sibling. */
.dirhead{display:flex; align-items:center; gap:8px 12px; flex-wrap:wrap; margin:0 0 4px}
.dirhead .pagetitle{margin:0}
.storefilter-cb{position:absolute; width:1px; height:1px; margin:-1px; padding:0;
                overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0}
/* margin-left:auto floats the toggle to the right edge of the .dirhead flex row */
.storefilter{display:inline-flex; align-items:center; gap:6px; cursor:pointer;
             font:bold 12px Arial; color:var(--navy); margin:0 0 0 auto; user-select:none}
.storefilter-box{width:13px; height:13px; flex:none; background:#fff; position:relative;
                 border:2px inset var(--silver)}
.storefilter-cb:checked ~ .dirhead .storefilter-box::after{
  content:"\2714"; position:absolute; inset:-4px 0 0 0; text-align:center;
  font:bold 13px "Courier New", monospace; color:var(--navy)}
.storefilter-cb:focus-visible ~ .dirhead .storefilter-box{outline:2px solid var(--navy); outline-offset:1px}
@media (hover:hover){ html:not(.touch) .storefilter:hover{color:var(--red)} }
.count.filtered{display:none}
.storefilter-cb:checked ~ .count.all{display:none}
.storefilter-cb:checked ~ .count.filtered{display:block}
.storefilter-cb:checked ~ .companygrid .companycard:not([data-store]){display:none}

/* "Show all" expander for large official catalogs (pure CSS, mirrors .storefilter).
   The hidden checkbox precedes the grid + toggle label so :checked ~ reaches them.
   nth-child(n+49) collapses everything past the 48 in views.js MERCH_CAP — keep
   the two in sync. .card is a flex grid item, so restore display:flex. */
.showall-cb{position:absolute; width:1px; height:1px; margin:-1px; padding:0;
            overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0}
.grid.capped > .card:nth-child(n+49){display:none}
.showall-cb:checked ~ .grid.capped > .card:nth-child(n+49){display:flex}
/* Vintage finds reuse the same toggle with their own initial-visible count
   (VINTAGE_CAP=24 in functions/_render/vintage.mjs) — keep nth-child(n+25) in sync. */
.grid.capped-v > .card:nth-child(n+25){display:none}
.showall-cb:checked ~ .grid.capped-v > .card:nth-child(n+25){display:flex}
.showall{display:inline-block; margin:12px 0 0; cursor:pointer; font:bold 12px Arial;
         color:var(--navy); background:var(--silver); border:2px outset var(--silver);
         padding:5px 14px; user-select:none}
.showall:active{border-style:inset}
.showall .showall-less{display:none}
.showall-cb:checked ~ .showall .showall-more{display:none}
.showall-cb:checked ~ .showall .showall-less{display:inline}
.showall-cb:focus-visible ~ .showall{outline:2px solid var(--navy); outline-offset:2px}
@media (hover:hover){ html:not(.touch) .showall:hover{color:var(--red)} }

.companygrid{display:grid; grid-template-columns:repeat(auto-fill,minmax(135px,1fr)); gap:12px}
.companycard{display:block; border:2px outset var(--silver); background:#fff; padding:10px 6px;
             text-align:center; cursor:pointer; text-decoration:none; color:inherit}
.companycard:visited{color:inherit}
@media (hover:hover){ html:not(.touch) .companycard:hover{background:#fffceb} }
.companycard .logo{height:60px; display:flex; align-items:center; justify-content:center; overflow:hidden}
.companycard .logo img,.companycard .logo svg{max-width:84px; max-height:60px}
.co-logo-img{object-fit:contain}
.companycard .nm{display:block; font:bold 12px Arial; margin-top:7px; color:var(--navy)}

/* ---- single company ---- */
.cohead{display:grid; grid-template-columns:84px minmax(0,1fr) auto; gap:14px; align-items:start;
        border:2px ridge var(--silver); background:#fff; padding:12px; margin-bottom:14px}
.cohead .cohead-main{min-width:0}
.cohead .logo{width:84px; height:84px; flex:none; display:flex; align-items:center; justify-content:center; overflow:hidden}
.cohead .logo img,.cohead .logo svg{max-width:84px; max-height:84px}
.cohead .coname{margin:0 0 2px; font:bold 20px "Times New Roman",serif; color:var(--navy)}
.cohead .sector{font-size:12px; color:#777; margin-bottom:6px}
.cohead .costatus{display:inline-block; font:bold 10px Arial; text-transform:uppercase;
       letter-spacing:.4px; padding:2px 8px; border:1px solid; margin:0 0 9px}
.cohead .costatus.defunct{color:#7a0000; background:#fbecec; border-color:#dd9999}
.cohead .blurb{font-size:13px; margin:0 0 10px}
.costats{display:flex; flex-direction:column; align-items:flex-end; gap:5px; margin:0; flex:none;
         font-size:12px; color:#333; text-align:right}
.costats .stat{white-space:nowrap; background:#fbfbf0; border:1px solid var(--silver); padding:2px 7px}
.costats .stat b{color:var(--navy); font-weight:bold; margin-right:4px; font-size:11px; text-transform:uppercase; letter-spacing:.3px}
.coactions{display:flex; gap:8px; flex-wrap:wrap}

/* ---- item detail ---- */
.detail{display:flex; gap:16px; flex-wrap:wrap; border:2px ridge var(--silver); background:#fff; padding:14px}
.detail .img{width:220px; height:220px; flex:none; display:flex; align-items:center; justify-content:center;
             border:2px inset var(--silver); background:#fff; overflow:hidden}
.detail .img img,.detail .img svg{max-width:100%; max-height:216px}
.detail .info{flex:1; min-width:200px}
.detail .info .iname{margin:0 0 4px; font:bold 19px "Times New Roman",serif; color:var(--navy)}
.detail .info .price{color:var(--red); font:bold 22px Arial; margin-bottom:10px}
.detail dl{display:grid; grid-template-columns:auto 1fr; gap:3px 10px; font-size:13px; margin:0 0 10px}
.detail dt{color:#777; font-weight:bold}
.detail dd{margin:0}
.detail .blurb{font-size:13px; font-style:italic; color:#333; margin-bottom:12px}

/* ---- share bar + "More from" related strip (item pages) ---- */
.sharebar{display:flex; flex-wrap:wrap; align-items:center; gap:6px;
          margin:12px 0 4px; padding:8px 10px; border:2px ridge var(--silver); background:#eef3ee}
.sharebar-label{font:bold 12px Arial; color:var(--navy); margin-right:2px}
.sharebtn{font:bold 11px Arial; padding:4px 9px; border:2px outset var(--silver);
          background:var(--silver); color:#000; text-decoration:none; cursor:pointer;
          display:inline-flex; align-items:center; gap:4px; border-radius:0; line-height:1.4}
.sharebtn:visited{color:#000}
.sharebtn:active{border-style:inset}
.sharebtn.x{background:#000; color:#fff}
.sharebtn.x:visited{color:#fff}
.sharebtn.rd{background:#ff4500; color:#fff}
.sharebtn.rd:visited{color:#fff}
.sharebtn.fb{background:#1877f2; color:#fff}
.sharebtn.fb:visited{color:#fff}
.sharebtn.copy{background:var(--gold); color:#7a0000}
.sharebtn.copied{background:#008000; color:#fff}
.sharebtn.native{display:none}            /* revealed only where navigator.share exists */
html.can-share .sharebtn.native{display:inline-flex}
@media (hover:hover){ html:not(.touch) .sharebtn:hover{filter:brightness(1.1)} }
/* Phones: label on its own line, bigger finger-friendly buttons that fill the row
   evenly (the desktop 27px-tall buttons are below a comfortable tap target). */
@media (max-width:560px){
  .sharebar{gap:6px; padding:9px}
  .sharebar-label{flex-basis:100%; margin:0 0 2px}
  .sharebtn{font-size:12px; padding:7px 10px; min-height:34px; flex:1 1 auto; justify-content:center}
}
.relsec{margin-top:18px; border-top:2px groove var(--silver); padding-top:12px}
.relsec-h{font-size:16px; margin-bottom:10px}

/* ---- prose (about) ---- */
.prose{border:2px ridge var(--silver); background:#fff; padding:14px 18px; font-size:14px}
.prose h2{margin:0 0 8px; font:bold 20px "Times New Roman",serif; color:var(--navy)}
.prose p{margin:0 0 10px}

/* ---- footer ---- */
footer{background:var(--navy); color:#cdd; text-align:center; padding:16px; font-size:12px;
       border-top:3px ridge var(--gold); line-height:1.8}
footer a{color:#9cf}
footer .fnav{display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:4px 8px}
footer .fnav .sep{color:#7a99}
footer .fine{margin-top:8px; color:#8aa; font-size:10px}

/* ---- sidebar widget: MARKETS (live stock ticker, app.js) ---- */
#tickerbox{padding:0}
#tickerbox h3{display:flex; align-items:center}
#tickerbox .led{width:8px; height:8px; border-radius:50%; margin-left:auto;
  background:#3f6; box-shadow:0 0 5px #3f6; animation:ledblink 1.4s steps(1) infinite}
@keyframes ledblink{50%{opacity:.2; box-shadow:none}}
.ticker-screen{height:228px; overflow:hidden; position:relative; margin:6px;
  background:#001b00; border:2px inset var(--silver);
  background-image:repeating-linear-gradient(0deg,rgba(0,0,0,.35) 0 1px,transparent 1px 3px)}
/* Scoped under #tickerbox: the generic .box rules (.box ul padding, .box li
   border/padding, .box li a font-size:13px) are more specific than bare
   .ticker-track/.trow/.trow a and would otherwise win — id scoping reclaims them. */
#tickerbox .ticker-track{list-style:none; margin:0; padding:0}
#tickerbox .ticker-track.rolling{animation:tickerscroll var(--dur,28s) linear infinite}
#tickerbox .ticker-screen:hover .ticker-track.rolling{animation-play-state:paused}
@keyframes tickerscroll{from{transform:translateY(0)} to{transform:translateY(-50%)}}
#tickerbox .trow{border-bottom:1px solid rgba(80,255,120,.12); padding:0}
#tickerbox .trow a{display:flex; align-items:baseline; gap:3px; padding:3px 4px;
  text-decoration:none; white-space:nowrap; color:#9f9; font:bold 11px "Courier New",monospace}
#tickerbox .trow a:visited{color:#9f9}
#tickerbox .tsym{color:#dfffd8; width:36px; flex:none; overflow:hidden; text-overflow:ellipsis}
/* Company name: hidden in the narrow desktop sidebar, shown on mobile (full-width) */
#tickerbox .tname{display:none}
#tickerbox .tval,#tickerbox .tpx{color:#7de07d; flex:1; min-width:0; text-align:right; overflow:hidden; font-variant-numeric:tabular-nums}
#tickerbox .tpct{flex:none; width:46px; text-align:right; font-variant-numeric:tabular-nums; color:#cc6}
#tickerbox .tpct.up{color:#36f06a} #tickerbox .tpct.down{color:#ff5a5a} #tickerbox .tpct.flat{color:#cc6}
#tickerbox .trow.flash{animation:rowflash .9s ease-out}
@keyframes rowflash{from{background:rgba(255,255,255,.22)} to{background:transparent}}
.ticker-foot{font:bold 9px "Courier New",monospace; text-transform:uppercase;
  letter-spacing:.5px; text-align:center; color:#0a0; padding:2px 4px 5px}

/* ---- sidebar widget: WORDS OF WEALTH (quote of the day + retro badges) ---- */
.quotebox .qcard{margin:0; padding:9px 10px 7px; position:relative;
  background:#fffdf0; border-bottom:1px dotted #cbb}
.qcard .qmark{position:absolute; top:0; left:3px; font:36px Georgia,serif; color:#e0d49a; line-height:1}
.quote-text{margin:0 0 4px; padding-left:13px; min-height:54px;
  font:italic 13px Georgia,serif; color:#2a2a2a; line-height:1.35}
.quote-text .caret{font-style:normal; color:#888; animation:caretblink .9s steps(1) infinite}
@keyframes caretblink{50%{opacity:0}}
.quote-by{margin:0; text-align:right; font:bold 11px Arial; color:#006}

@media (prefers-reduced-motion: reduce){
  .ticker-track.rolling{animation:none}
  .ticker-screen{overflow-y:auto}
  #tickerbox .led,.quote-text .caret{animation:none}
}

@media(max-width:560px){
  /* one column — let the sidebar boxes flow in so we can reorder them around main */
  .cols{flex-direction:column}
  aside{display:contents}
  #navbox{order:0; margin:14px 16px 14px}   /* Sectors dropdown on top, clear of the nav bar */
  #main{order:1}                            /* companies right under it */
  #rentbox{order:2; margin:0 16px 14px}     /* "Your Ad Here" drops below the grid */
  #tickerbox{order:4; margin:0 16px 14px}   /* ticker + quote stack under the ad */
  #quotebox{order:5; margin:0 16px 14px}

  /* Full-width on mobile, so fill the slack with the company name; price shrinks
     to its content and the name takes the remaining flex. */
  #tickerbox .tname{display:block; flex:1; min-width:0; color:#9fdf9f;
    overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
  #tickerbox .tpx{flex:none}

  /* On a company detail page, drop the Markets ticker + Words of Wealth so the
     phone view stays focused on the company, not the chrome. .cohead marks a
     /company/<id> page; :has() keeps this correct across SPA navigations (the
     widgets live in the static <aside>, but #main's content tells us the route). */
  .cols:has(.cohead) #tickerbox,
  .cols:has(.cohead) #quotebox{display:none}

  /* Home screen only: lift "Your Ad Here" up under the Sectors box, above the long
     156-card grid, instead of burying it at the bottom. The home/all directory is
     the only listing with a .companygrid and no .crumbs (sector & search pages have
     crumbs). order:0 ties #rentbox with #navbox; flex source order (navbox precedes
     rentbox in the DOM) keeps Sectors first, then the ad. :has() stays correct
     across SPA navigations. */
  .cols:has(.companygrid):not(:has(.crumbs)) #rentbox{order:0}

  /* search drops to its own full-width row */
  .search{margin-left:0; order:3; width:100%}
  .search input{flex:1; width:auto}

  /* compact masthead: brand left, visitor count on the right */
  .brand{font-size:19px}
  .brand small{display:none}
  .userbox{margin-left:auto; gap:10px}

  /* Sectors combobox styling is shared (see .secdrop above) */

  /* company header: stats drop below the blurb as a left-aligned wrapping row */
  .cohead{grid-template-columns:1fr}
  .costats{flex-direction:row; flex-wrap:wrap; align-items:flex-start;
           gap:6px 12px; text-align:left; margin-top:4px}

  /* item detail: stack and center the product image. The wrapping flex row pins
     the fixed 220px box to the left with a big empty gap beside it; on a phone
     stack the box over the info and center it (info stays full-width, left-aligned). */
  .detail{flex-direction:column; align-items:center}
  .detail .info{width:100%; min-width:0}

  /* Keep all four nav links on a single line on phones: shrink the font and
     tighten horizontal padding so "Submit a Suggestion" stops pushing "About"
     onto a second row. nowrap forces one line; the links spread to fill the bar. */
  nav.top{display:flex; flex-wrap:nowrap; gap:2px; padding:6px 6px; justify-content:space-between}
  nav.top a{margin:0; padding:7px 5px; font-size:12px; white-space:nowrap}
  nav.top a[data-nav="about"]{margin-left:0}  /* no far-right push on mobile; space-between handles spacing */
  .btn{padding:7px 12px}                 /* search "Go!", "Official Store" */
  .search input{padding:7px 7px}
  .secdrop-label{padding:8px 8px}        /* taller Sectors control */
  .card .add{padding:8px 5px}            /* "View in Shop" / "Find on …" */

  /* footer nav: stack each entry on its own centered line, drop the dot
     separators so nothing dangles when it wraps on a narrow screen */
  footer .fnav{flex-direction:column; gap:6px}
  footer .fnav .sep{display:none}
}
