/* Nearby Hacker News: the plain Hacker News look. Light only, like HN. */
:root {
  color-scheme: light;
  --accent: #ff6600;
  --paper: #f6f6ef;
  --page: #ffffff;
  --ink: #000000;
  --dim: #828282;
  --visited: #828282;
  --font: Verdana, Geneva, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--page); }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 10pt/1.35 var(--font);
}

a { color: inherit; text-decoration: none; }

/* HN's centred 85% column; full width on phones. */
.page {
  width: 85%;
  min-width: 0;
  margin: 8px auto;
  background: var(--paper);
}
@media (max-width: 750px) {
  .page { width: 100%; margin: 0; }
}

/* Header: the orange bar. */
.site-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px;
  background: var(--accent);
  color: #000;
}
.logo { flex: none; display: block; width: 18px; height: 18px; }
.logo img { display: block; }
.site-header nav { line-height: 1.6; }
.site-header nav a:hover { text-decoration: underline; }
.site-header .brand { font-weight: bold; margin-right: 6px; }
.site-header .current { color: #fff; }

main { padding: 6px 0 10px; }

/* Map: full width under the orange bar. */
.map {
  height: 320px;
  margin: -6px 0 8px;
  border-bottom: 1px solid #e0e0d8;
  background: #e8e8e0;
  z-index: 0;
}
@media (max-width: 750px) { .map { height: 240px; } }
.leaflet-container { font: 8pt var(--font); }
/* The "show all projects" box, floating in the map's top right corner. */
.map-wrap { position: relative; }
.map-scope {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  margin: 0;
  padding: 3px 6px;
  border: 1px solid var(--accent);
  background: var(--page);
  font-size: 8pt;
  color: var(--dim);
}
.map-scope a, .map-scope b { color: var(--ink); }
.map-scope a:hover { text-decoration: underline; }
/* Muted grey tiles so only the orange squares stand out. */
.osm-tiles { filter: grayscale(1) contrast(0.85) brightness(1.08); }
/* A place's post count in a square like the logo; merged squares get a heavier border. */
.map-badge {
  box-sizing: border-box;
  background: var(--accent);
  color: #000;
  font: bold 8pt var(--font);
  cursor: pointer;
}
.map-badge span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; line-height: 1; }
.map-badge:hover { background: #e65c00; }
.map-list { max-height: 180px; overflow-y: auto; line-height: 1.6; color: var(--dim); }
.leaflet-popup-content a { color: var(--ink); font-weight: bold; }
.leaflet-popup-content a:hover { text-decoration: underline; }

/* Posts */
.posts {
  margin: 0;
  padding: 0 0 0 calc(2em + 10px);
  color: var(--dim);
}
.post { padding: 0 8px 5px 2px; }
.post::marker { font-size: 10pt; }
.post-title { color: var(--ink); overflow-wrap: anywhere; }
.post-title a:visited { color: var(--visited); }
.host { color: var(--dim); font-size: 8pt; }
.post-meta { color: var(--dim); font-size: 7pt; }
.post-meta a:hover, .host a:hover, .note a:hover, .more a:hover, .site-footer a:hover,
.place-list a:hover, .nearby a:hover, .tabs a:hover { text-decoration: underline; }

.more { margin: 6px 0 0; padding-left: calc(2em + 12px); color: var(--ink); }
.note, .empty { margin: 4px 0 10px; padding: 0 10px; color: var(--dim); }
.empty { padding: 20px 10px; }

/* Places */
.place-head { padding: 0 10px; }
.place-head h1 { margin: 4px 0 0; font-size: 12pt; }
.place-head .note { padding: 0; }
.country { padding: 0 10px; margin: 8px 0 14px; }
.country h2 { margin: 0 0 2px; font-size: 10pt; }
.region h3 { margin: 6px 0 0; font-size: 8pt; font-weight: normal; color: var(--dim); }
.place-list { margin: 2px 0; color: var(--dim); }
.place-list a, .nearby a { color: var(--ink); }
.count { color: var(--dim); font-size: 8pt; }
.nearby { margin: 14px 0 0; padding: 0 10px; color: var(--dim); }

/* Places picker: continent, then country, then posts by subdivision. */
.crumbs { padding: 0 10px; margin: 0 0 8px; color: var(--dim); }
.crumbs a { color: var(--ink); }
.crumbs a:hover, .choices a:hover { text-decoration: underline; }
.crumbs b { color: var(--ink); }
.step { padding: 0 10px; margin: 8px 0 14px; }
.step h2 { margin: 0 0 6px; font-size: 10pt; }
.choices { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; }
.choices a { color: var(--ink); font-size: 10pt; }
.region .posts { margin: 4px 0 8px; padding-left: 2.5em; }
.region-index { margin: 2px 0 10px; color: var(--dim); line-height: 1.7; }
.region-index a { color: var(--ink); }
.region { scroll-margin-top: 6px; }
.region h3 { display: inline-block; margin-right: 8px; }
.to-top { font-size: 7pt; color: var(--dim); }
.region-index a:hover, .to-top:hover { text-decoration: underline; }

/* Footer: HN's orange rule, links and search box. */
.site-footer {
  margin: 0 0 0;
  padding: 10px 10px 20px;
  border-top: 2px solid var(--accent);
  text-align: center;
  font-size: 8pt;
  color: var(--dim);
}
.site-footer p { margin: 0 0 12px; }
.site-footer a { color: var(--ink); }
.search { color: var(--dim); }
.search input {
  font: inherit;
  width: 14em;
  max-width: 60%;
  margin-left: 4px;
  border: 1px solid var(--dim);
  background: var(--page);
  color: var(--ink);
}

/* Admin review */
.tabs { padding: 0 10px 8px; color: var(--dim); }
.tabs a { color: var(--ink); }
.tabs .current { font-weight: bold; }
.notice { color: var(--accent); }
.reason { margin: 2px 0 0; font-size: 8pt; color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.actions form { margin: 0; }
.actions button {
  font: 8pt var(--font);
  padding: 1px 6px;
  border: 1px solid var(--dim);
  background: var(--page);
  color: var(--ink);
  cursor: pointer;
}
.actions button:hover { border-color: var(--accent); }
.actions button.selected { background: var(--accent); color: #fff; border-color: var(--accent); }
