/* CMS pages: same palette as the about page, OM's orange accent. */
:root {
  --bg: #f6f5ef; --card: #fff; --fg: #222; --muted: #6b6b6b; --line: #e3e1d2;
  --link: #1e6fb0; --accent: #FF7326; --error: #c0392b; --ok: #2e7d32;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121212; --card: #1b1b1b; --fg: #ddd; --muted: #8a8a8a; --line: #2a2a2a;
    --link: #5aa9e6; --error: #ef6f5e; --ok: #7bc47f; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 system-ui, sans-serif; }
a { color: var(--link); }
[x-cloak] { display: none !important; }

/* Navigation drawer on the left: permanent from 900 px, slides in over the page below. */
:root { --drawer: 232px; }
#drawer { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; width: var(--drawer);
  display: flex; flex-direction: column; overflow-y: auto; padding: 12px 10px;
  background: var(--card); border-right: 1px solid var(--line); }
#drawer a, #drawer button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px;
  border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left;
  text-decoration: none; cursor: pointer; }
#drawer a:hover, #drawer button:hover { background: var(--bg); }
#drawer a[aria-current] { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
#drawer svg, .topbar svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
#drawer .home { color: var(--muted); margin-bottom: 8px; }
#drawer nav { flex: 1; }
#drawer h2 { margin: 16px 10px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); }
#drawer .me { border-top: 1px solid var(--line); padding-top: 8px; }
#drawer .me button { color: var(--muted); }
.topbar { display: none; align-items: center; gap: 8px; padding: 6px 12px; position: sticky; top: 0; z-index: 10;
  background: var(--card); border-bottom: 1px solid var(--line); font-weight: 600; }
.topbar.plain { display: flex; padding: 10px 16px; }
.topbar.plain a { text-decoration: none; }
.topbar .menu { border: 0; background: none; color: inherit; padding: 8px; border-radius: 8px; cursor: pointer; display: grid; }
.backdrop { display: none; }
.with-drawer main { margin-left: var(--drawer); }
@media (max-width: 899px) {
  .with-drawer .topbar { display: flex; }
  .with-drawer main { margin-left: 0; }
  #drawer { transform: translateX(-100%); visibility: hidden; box-shadow: 0 0 24px rgba(0,0,0,.25);
    transition: transform .2s ease-out, visibility 0s linear .2s; }
  #drawer.open { transform: none; visibility: visible; transition: transform .2s ease-out; }
  .backdrop { display: block; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.35); }
}
main { max-width: 1040px; padding: 20px 24px 48px; }
.cms:not(.with-drawer) main { margin: 0 auto; }
@media (max-width: 899px) { main { padding: 16px 16px 40px; } }
h1 { font-size: 24px; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
h2 { font-size: 17px; margin: 24px 0 8px; }
.card h2:first-child, .card h1:first-child { margin-top: 0; }
.muted { color: var(--muted); }
.small, .hint { font-size: 13px; }
.hint { display: block; color: var(--muted); font-weight: normal; }
.pre { white-space: pre-wrap; }
.error { color: var(--error); }
.ok { color: var(--ok); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 16px 0; }
.narrow { max-width: 460px; }
label { display: block; margin: 0 0 12px; font-weight: 500; }
label.check { display: flex; gap: 8px; align-items: baseline; font-weight: normal; }
input:not([type=checkbox]), select, textarea {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px; font: inherit; color: inherit;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
label.check input { width: auto; }
button, .button { font: inherit; padding: 7px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--card); color: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.link { border: 0; background: none; padding: 0; color: var(--link); }
form.inline { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
form.inline label { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.filters select { width: auto; margin: 0; }
.filters label { margin: 0; }
table.places { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.places th, .places td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.places th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.places tr.inactive { opacity: .5; }
.places .num { text-align: right; font-variant-numeric: tabular-nums; }
.places select { width: auto; margin: 0; }
.places input[type=email] { width: 16em; margin: 0; }
/* Overflowing tables scroll inside themselves on phones, not the page. */
@media (max-width: 700px) { table.places { display: block; overflow-x: auto; } }
.status { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--line); white-space: nowrap; }
.s-submitted { background: #fff1c2; color: #6b5200; }
.s-changes_requested { background: #ffe0cc; color: #8a3a00; }
.s-approved, .s-claimed { background: #d7ebff; color: #0b4f8a; }
.s-in_osm, .s-done { background: #d9f2dc; color: #1e5e24; }
.s-rejected { background: #eee; color: #777; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 16px 0; }
.stats a { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-decoration: none; color: inherit; }
.stats strong { display: block; font-size: 24px; color: var(--accent); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.minimap { height: 320px; border-radius: 12px; overflow: hidden; position: relative; }
pre.tags { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; overflow-x: auto; font-size: 13px; }
.actions .buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
ul.history { list-style: none; padding: 0; margin: 0; font-size: 14px; }
ul.history li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.dupes { background: #fff6e0; color: #5a4300; border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.dupes ul { margin: 4px 0 0; padding-left: 18px; }
.dupes .muted { color: #8a7333; }
.copy { display: flex; gap: 8px; }
.copy input { margin: 0; }
.sprite { display: inline-block; flex: none; vertical-align: middle; }
.minimap.tall { height: 420px; margin-bottom: 16px; }
.actions.buttons { display: flex; gap: 8px; margin-top: 16px; }
.error ul { margin: 4px 0 0; padding-left: 18px; }
code { font-size: 13px; background: var(--bg); padding: 0 4px; border-radius: 4px; }
