/* Hampton Bays + Southampton Atlas: one stylesheet, no external fonts. */
:root {
  --bg: #fcfcfb;
  --surface: #ffffff;
  --ink: #141413;
  --ink-2: #4a4945;
  --line: #d9d7d0;
  --accent: #1d5fb0;
  --accent-ink: #ffffff;
  --link: #1a56a8;
  --focus: #b8500f;
  --note-bg: #fff6df;
  --note-line: #c98500;
  --open: #2a78d6;
  --closed: #c4501f;
  --unknown: #767570;
  --hb: #2a78d6;
  --sh: #eb6834;
  --outline: #8c8a82;
  --land: #f1efe8;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1a1a19; --surface: #232321; --ink: #f0efec; --ink-2: #c3c2b7; --line: #45443f;
    --accent: #3987e5; --accent-ink: #0b0b0b; --link: #8ab8f2; --focus: #f0a35e;
    --note-bg: #352c14; --note-line: #c98500; --open: #3987e5; --closed: #e0703f; --unknown: #a3a29b;
    --hb: #3987e5; --sh: #d95926; --outline: #8c8a82; --land: #2a2a27;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1a1a19; --surface: #232321; --ink: #f0efec; --ink-2: #c3c2b7; --line: #45443f;
  --accent: #3987e5; --accent-ink: #0b0b0b; --link: #8ab8f2; --focus: #f0a35e;
  --note-bg: #352c14; --note-line: #c98500; --open: #3987e5; --closed: #e0703f; --unknown: #a3a29b;
  --hb: #3987e5; --sh: #d95926; --outline: #8c8a82; --land: #2a2a27;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
a { color: var(--link); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-row { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding-top: .6rem; padding-bottom: .2rem; }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; flex: 1 1 12rem; min-width: 0; }
.lang { font-weight: 600; white-space: nowrap; }
.nav { list-style: none; margin: 0; padding: .35rem 0 .5rem; display: flex; flex-wrap: wrap; gap: .35rem .5rem; }
.nav a { display: inline-block; text-decoration: none; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 999px; font-weight: 600; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.subnav { list-style: none; margin: 0; padding: 0 0 .6rem; display: flex; flex-wrap: wrap; gap: .2rem 1rem; font-size: .95rem; }
.subnav a { text-decoration: none; }
.subnav a:hover, .subnav a[aria-current] { text-decoration: underline; }
.subnav a[aria-current] { font-weight: 700; color: var(--ink); }
.lang-hint p { margin: .25rem 0 .35rem; padding: .4rem .75rem; background: var(--note-bg); border-left: 4px solid var(--note-line); max-width: none; display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.hint-close { font: inherit; font-size: 1.3rem; line-height: 1; background: none; border: 0; color: var(--ink); cursor: pointer; padding: .1rem .4rem; }
.howto { color: var(--ink-2); border-left: 3px solid var(--line); padding-left: .75rem; }
.timeline { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.timeline li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.place-h { margin: .9rem 0 .25rem; }
q { quotes: "“" "”"; }
details.toc { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem; background: var(--surface); }
main { padding-top: 1.25rem; padding-bottom: 2rem; }
main:focus { outline: none; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: .25rem 0 .75rem; }
h2 { font-size: 1.3rem; margin: 2rem 0 .5rem; }
h3 { font-size: 1.1rem; margin: 1.25rem 0 .4rem; }
p, li { max-width: 70ch; }
.lede { font-size: 1.08rem; color: var(--ink-2); }
.asof { color: var(--ink-2); font-size: .92rem; }
.note { background: var(--note-bg); border-left: 4px solid var(--note-line); padding: .6rem .9rem; margin: .75rem 0; max-width: 70ch; }
.muted { color: var(--ink-2); }
.small { font-size: .94rem; }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); padding: .5rem .9rem; border-radius: 6px; text-decoration: none; font-weight: 600; border: 0; font: inherit; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.fix { margin-top: 2.5rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .88rem; padding: .75rem 0; }
dl.facts { display: grid; grid-template-columns: minmax(9rem, 14rem) 1fr; gap: .4rem 1rem; margin: 1rem 0; }
dl.facts dt { font-weight: 600; color: var(--ink-2); }
dl.facts dd { margin: 0; }
@media (max-width: 36rem) { dl.facts { grid-template-columns: 1fr; gap: .1rem; } dl.facts dd { margin-bottom: .6rem; } }
.status { display: inline-block; font-weight: 700; padding: .05rem .5rem; border-radius: 4px; border: 2px solid currentColor; }
.status-open { color: var(--open); }
.status-closed { color: var(--closed); }
.status-unknown, .status-disagree { color: var(--unknown); }
.table-wrap { overflow-x: auto; max-width: 100%; margin: .5rem 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
td { overflow-wrap: break-word; }
/* rows as stacked cards "label: value": always for wide tables (.stack), on phones for the rest (.stack-narrow) */
table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
table.stack tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: .75rem; }
table.stack tr { border: 1px solid var(--line); border-radius: 8px; padding: .65rem .85rem; background: var(--surface); }
table.stack tr.hidden { display: none; }
table.stack td { border: 0; padding: .15rem 0; text-align: left; }
table.stack td:empty { display: none; }
table.stack td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-2); }
table.stack.title-first td:first-child { font-size: 1.05rem; padding-bottom: .3rem; }
table.stack.title-first td:first-child::before { content: none; }
table.stack caption { display: block; }
caption { text-align: left; font-weight: 600; padding: .25rem 0; color: var(--ink-2); }
th, td { text-align: left; vertical-align: top; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
th { background: var(--surface); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.cards li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; }
.cards a { font-weight: 700; font-size: 1.05rem; }
.cards p { margin: .35rem 0 0; color: var(--ink-2); }
.stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; }
.stats li { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; background: var(--surface); }
.stats strong { display: block; font-size: 1.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: end; margin: 1rem 0; padding: .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.filters label { display: flex; flex-direction: column; font-size: .9rem; font-weight: 600; gap: .2rem; max-width: 100%; min-width: 0; }
select { width: 100%; text-overflow: ellipsis; }
.filters select { width: auto; max-width: 100%; }
.filters .check { flex-direction: row; align-items: center; gap: .4rem; font-weight: 600; }
select, input[type=text], input[type=date], input[type=search], textarea { font: inherit; padding: .35rem .5rem; border: 1px solid var(--outline); border-radius: 5px; background: var(--bg); color: var(--ink); max-width: 100%; }
textarea { width: 100%; min-height: 6rem; }
.maps { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; }
figure.map { margin: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: .5rem; }
figure.map figcaption { font-weight: 600; padding: .25rem .25rem .5rem; }
figure.map svg { width: 100%; height: auto; display: block; }
.map-land { fill: var(--land); stroke: var(--outline); stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.pin circle { stroke: var(--surface); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.pin.open circle { fill: var(--open); }
.pin.closed circle { fill: var(--closed); }
.pin.unknown circle, .pin.disagree circle { fill: var(--unknown); }
.pin:hover circle, .pin:focus circle { stroke: var(--ink); stroke-width: 2.5; }
.pin.hidden, tr.hidden, li.hidden { display: none; }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .9rem; margin: .5rem 0; padding: 0; list-style: none; }
.legend span.sw { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; }
.sw.open { background: var(--open); } .sw.closed { background: var(--closed); } .sw.unknown { background: var(--unknown); }
.sw.hb { background: var(--hb); border-radius: 2px; } .sw.sh { background: var(--sh); border-radius: 2px; }
.chain { list-style: none; padding: 0; border-left: 3px solid var(--line); margin-left: .4rem; }
.chain li { position: relative; padding: .2rem 0 .8rem 1.1rem; }
.chain li::before { content: ""; position: absolute; left: -.5rem; top: .6rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--outline); }
.chain li.open::before { background: var(--open); } .chain li.closed::before { background: var(--closed); }
.cols { columns: 16rem; column-gap: 2rem; }
.cols li { break-inside: avoid; }
.chart { width: 100%; max-width: 46rem; height: auto; display: block; }
.chart text { fill: var(--ink-2); font-size: 12px; font-family: inherit; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--outline); }
.chart .s-hb { stroke: var(--hb); fill: none; stroke-width: 2; }
.chart .s-sh { stroke: var(--sh); fill: none; stroke-width: 2; }
.chart .b-hb { fill: var(--hb); } .chart .b-sh { fill: var(--sh); }
.chart .tide { stroke: var(--accent); fill: none; stroke-width: 2; }
.chart .dot-hb { fill: var(--hb); stroke: var(--surface); stroke-width: 2; }
.chart .dot-sh { fill: var(--sh); stroke: var(--surface); stroke-width: 2; }
details { margin: .5rem 0; }
summary { cursor: pointer; font-weight: 600; }
.tag { display: inline-block; font-size: .8rem; border: 1px solid var(--line); border-radius: 4px; padding: 0 .35rem; color: var(--ink-2); }
.warn { font-weight: 600; }
form.corr { display: grid; gap: .75rem; max-width: 40rem; }
form.corr label { font-weight: 600; display: grid; gap: .25rem; }
/* printable fish ruler: SVGs carry their size in inches/cm and must never be scaled by CSS */
.sheet { background: #fff; color: #000; border: 1px dashed var(--outline); border-radius: 6px; padding: .5rem; margin: 1rem 0; overflow-x: auto; }
.sheet p { margin: .15rem 0; max-width: none; }
.sheet-line { font-size: .8rem; }
.cal { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem 1rem; margin: .25rem 0; }
.cal-label { font-size: .8rem; font-weight: 600; }
.sheet svg { display: block; max-width: none; flex: none; }
.ruler-wrap { overflow-x: auto; }
@media print {
  .site-header, .site-footer, .fix, .filters, .skip, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: #000; }
  .print-only { display: block !important; }
  main.wrap { max-width: none; padding: 0; }
  .sheet { border: 0; border-radius: 0; padding: 0; margin: 0; overflow: visible; break-inside: avoid; page-break-inside: avoid; break-after: page; page-break-after: always; }
  .ruler-wrap { overflow: visible; }
  .sheet-line { font-size: 8pt; }
  .cal-label { font-size: 8pt; }
}
.print-only { display: none; }
@media (max-width: 40rem) {
  html { font-size: 106.25%; }   /* 17px base on phones: body 17px, small text about 16px */
  h1 { font-size: 1.55rem; }
  .brand { font-size: 1.05rem; }
  table.stack-narrow thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.stack-narrow, table.stack-narrow tbody, table.stack-narrow tr, table.stack-narrow td { display: block; width: 100%; }
  table.stack-narrow tr { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin: 0 0 .75rem; background: var(--surface); }
  table.stack-narrow tr.hidden { display: none; }
  table.stack-narrow td { border: 0; padding: .15rem 0; text-align: left; }
  table.stack-narrow td:empty { display: none; }
  table.stack-narrow td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-2); }
  table.stack-narrow.title-first td:first-child { font-size: 1.05rem; }
  table.stack-narrow.title-first td:first-child::before { content: none; }
  table.stack-narrow caption { display: block; }
  .cards { grid-template-columns: 1fr; }
  .chart text { font-size: 24px; }   /* the 640-unit chart is drawn at about half size on a phone */
  /* the long business list: one short card per business, values inline */
  table.compact tr { padding: .45rem .7rem; margin-bottom: .45rem; }
  table.compact td { display: inline; padding: 0; }
  table.compact td::before { content: none !important; }
  table.compact td:first-child { display: block; }
  table.compact td:not(:first-child):not(:empty) + td:not(:empty)::before { content: " · " !important; font-weight: 400; }
  .nav { gap: .3rem .35rem; }
  .nav a { padding: .25rem .55rem; }
  .subnav { display: none; }   /* phones: the section page lists the same links (two taps to any page) */
  .cols { columns: 1; }
}
/* address histories: older records as stacked cards, then a break, then the atlas's recent records */
.htl { list-style: none; padding: 0; margin: .5rem 0 1rem; display: grid; gap: .55rem; }
.hcard { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--outline); border-radius: 8px; padding: .55rem .8rem; overflow-wrap: anywhere; }
.hcard.hcivic { border-left-color: var(--line); }
.hcard .hy { display: block; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hcard .hn { font-weight: 700; }
.hcard .hu { font-weight: 600; font-style: italic; }
.hcard .hb, .hcard .ha { display: block; margin-top: .15rem; }
.hst { display: block; color: var(--ink-2); margin-top: .1rem; overflow-wrap: anywhere; }
a.ref { text-decoration: none; white-space: nowrap; }
.hbreak { border-top: 3px double var(--outline); margin: 2rem 0 .25rem; }
.addr-notes { background: var(--note-bg); border-left: 4px solid var(--note-line); padding: .5rem .8rem; max-width: 70ch; }
.hsrc { padding-left: 1.6rem; overflow-wrap: anywhere; }
.hsrc li { margin: .2rem 0; }
.hsrc li:target { background: var(--note-bg); }
.longest { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0 2rem; }
.longest-list { padding-left: 1.6rem; }
.longest-list li { margin: .25rem 0; }
