/* Moraine Research: data center moratorium map. Light mode, Moraine ink + validated status colors. */
:root {
  --ink: #0f3833; --body: #3d5550; --muted: #5f726d; --line: #dde7e4; --paper: #f6f6f4; --teal: #0d9999; --teal-d: #087878;
  --in: #c8372d; --lead: #ee8f86; --pend: #e9c630; --pend-line: #a8850a; --end: #c8d6d1; --other: #9db4ae;
  --top: 64px; --shadow: 0 8px 24px -16px rgb(15 56 51 / .4);
}
.bare { --top: 12px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--paper); color: var(--body); font: 13.5px/1.45 Inter, Geist, system-ui, sans-serif; }
button { font: inherit; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#app { position: relative; height: 100%; display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.top { display: flex; align-items: center; gap: 16px; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 600; }
.brand em { font-style: normal; font-weight: 400; color: var(--muted); }
.top h1 { margin: 0; font: 600 15px Geist, Inter, sans-serif; color: var(--ink); }
.asof { margin: 0 0 0 auto; font-size: 12.5px; color: var(--muted); }
#map { position: relative; min-height: 360px; }

/* search */
.search { position: absolute; z-index: 4; top: var(--top); left: 12px; width: 268px; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%235f726d' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E") 11px 50% no-repeat; font: 14px Inter, Geist, sans-serif; color: var(--ink); box-shadow: var(--shadow); }
.search input:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.search ul { list-style: none; margin: 4px 0 0; padding: 4px; max-height: 340px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px -14px rgb(15 56 51 / .5); }
.search li { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 7px 8px; border-radius: 7px; cursor: pointer; align-items: center; }
.search li[aria-selected="true"], .search li:hover { background: #e9f4f2; }
.search li b { color: var(--ink); font-weight: 600; }
.search li small { grid-column: 1 / -1; color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.search li .st { color: var(--muted); font-size: 12px; }
.search li.none { cursor: default; color: var(--muted); display: block; }
.search li.none:hover { background: none; }

/* summary strip */
.summary { position: absolute; z-index: 2; top: var(--top); left: 292px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 292px - 60px); }
.summary .stat { display: inline-flex; align-items: baseline; gap: 6px; height: 38px; align-items: center; padding: 0 12px; background: rgb(255 255 255 / .96); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); white-space: nowrap; }
.summary .stat b { font: 600 17px Geist, Inter, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary .stat span { font-size: 12.5px; color: var(--body); }
.summary .stat small { font-size: 11.5px; color: var(--muted); }
.summary .stat.off { opacity: .5; }

/* panel */
.panel { position: absolute; top: calc(var(--top) + 46px); left: 12px; width: 268px; max-height: calc(100% - var(--top) - 64px); overflow: auto; background: rgb(255 255 255 / .97); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.panel__head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--ink); font-weight: 600; }
.panel__head:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; border-radius: 12px; }
.panel__chip { display: none; gap: 4px; margin-left: auto; align-items: center; }
.panel__caret { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-135deg) translate(-2px, -2px); transition: transform .15s; }
.panel.is-collapsed .panel__caret { transform: rotate(45deg); }
.panel.is-collapsed .panel__chip { display: inline-flex; margin-left: 0; }
.panel.is-collapsed { width: auto; }
.panel.is-collapsed .panel__body { display: none; }
.panel__body { padding: 0 14px 14px; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { font-weight: 600; color: var(--ink); margin-bottom: 4px; padding: 0; }
.panel label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.panel label b { margin-left: auto; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.panel input[type="checkbox"] { accent-color: var(--ink); }
.toggle { margin-top: 6px; padding-top: 6px !important; border-top: 1px solid var(--line); }
.select { display: grid !important; gap: 4px; margin-top: 10px; font-weight: 600; color: var(--ink); }
.select select { font: inherit; font-weight: 400; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--body); }
.panel fieldset + fieldset { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.note { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.panel .note.sub { margin: 0 0 4px 26px; display: flex; align-items: center; gap: 6px; line-height: 1.3; }
.sw { width: 11px; height: 11px; border-radius: 50%; flex: none; display: inline-block; }
.sw--in { background: var(--in); }
.sw--lead { background: var(--lead); }
.sw--pend { background: var(--pend); box-shadow: inset 0 0 0 1px var(--pend-line); }
.sw--end { border: 2px solid var(--end); }
.sw--other { background: var(--other); }
.sw--campus { width: 9px; height: 9px; background: var(--ink); }
.sizes { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.sizes .s1 { width: 5px; height: 5px; } .sizes .s2 { width: 9px; height: 9px; } .sizes .s3 { width: 14px; height: 14px; }
.sw--need { width: 10px; height: 10px; border: 2px solid var(--ink); background: #fff; }
.sw--util { width: 14px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(45deg, rgb(61 85 80 / .35) 0 2px, transparent 2px 5px); box-shadow: inset 0 0 0 1px #3d5550; }
.sw--note { width: 16px; height: 16px; background: var(--ink); color: #fff; font: 600 10px Inter, sans-serif; display: inline-grid; place-items: center; font-style: normal; }

/* timeline */
.time { position: absolute; left: 292px; right: 60px; bottom: 34px; display: flex; gap: 10px; align-items: center; padding: 8px 14px; background: rgb(255 255 255 / .96); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.play { width: 34px; height: 34px; flex: none; border: 0; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; cursor: pointer; }
.play:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.play[aria-pressed="true"] { background: var(--in); }
.time__track { flex: 1; min-width: 0; display: grid; gap: 2px; }
.time__label { font: 600 13px Geist, Inter, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.time input[type="range"] { width: 100%; accent-color: var(--ink); }

/* pins and hover label */
.pin { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font: 600 12px Inter, sans-serif; display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 8px rgb(0 0 0 / .25); cursor: pointer; }
.pin:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.pin[hidden] { display: none; }
.maplibregl-popup.hover .maplibregl-popup-content { padding: 7px 10px; border-radius: 8px; font: 500 12.5px/1.35 Geist, Inter, system-ui, sans-serif; color: var(--body); box-shadow: 0 1px 2px rgba(15,56,51,.08), 0 10px 24px -12px rgba(15,56,51,.35); pointer-events: none; }
.maplibregl-popup.hover strong { display: block; color: var(--ink); font-weight: 600; }
.maplibregl-popup.hover .maplibregl-popup-tip { display: none; }

/* details card */
.card { position: absolute; right: 56px; top: calc(var(--top) + 50px); z-index: 3; width: 340px; max-height: calc(100% - var(--top) - 70px); overflow: auto; padding: 14px 16px 16px; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--status, var(--ink)); border-radius: 12px; box-shadow: 0 10px 28px -16px rgb(15 56 51 / .45); }
.card[hidden] { display: none; }
.card h2 { margin: 6px 40px 2px 0; font: 600 17px/1.25 Geist, Inter, sans-serif; color: var(--ink); }
.card .sub { margin: 0 0 8px; color: var(--muted); font-size: 12.5px; }
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font: 600 12px Inter, sans-serif; background: var(--status, var(--ink)); color: var(--ink); border: 1px solid rgb(15 56 51 / .18); }
.chip--dark { color: #fff; border-color: transparent; }
.chip--tag { background: #f1f5f3; color: var(--body); font-weight: 500; margin-left: 4px; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 8px 0 0; }
.card dt { color: var(--muted); }
.card dd { margin: 0; text-align: right; font-weight: 600; color: #122a26; font-variant-numeric: tabular-nums; }
.card .tier { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.card a { color: #0a6f6f; }
.card .x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: #f1f5f3; font-size: 20px; line-height: 1; color: var(--ink); cursor: pointer; }
.card .x:hover, .card .x:focus-visible { background: #dde7e4; outline: none; }
.card .x:focus-visible { box-shadow: 0 0 0 2px var(--teal); }
.card blockquote { margin: 10px 0 0; padding: 8px 10px; background: #f1f5f3; border-radius: 8px; color: #122a26; font-size: 13px; line-height: 1.5; }
.card blockquote cite { display: block; margin-top: 4px; font-style: normal; font-size: 11.5px; color: var(--muted); }
.card .note-text { margin: 8px 0 0; font-size: 13.5px; color: var(--body); }
.card .cond { margin: 8px 0 0; font-size: 12.5px; color: var(--body); }
.card .actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.btn { padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 12.5px; font-weight: 500; cursor: pointer; }
.btn:hover { background: #f1f5f3; }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.proj { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.proj h3 { margin: 0 0 2px; font: 600 13.5px Geist, Inter, sans-serif; color: var(--ink); }
.proj .tot { margin: 0 0 6px; font-size: 12.5px; color: var(--body); }
.proj .cw { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.proj ul { list-style: none; margin: 0; padding: 0; }
.proj li { margin: 0; }
.proj li button { display: grid; grid-template-columns: 14px 1fr auto; gap: 0 8px; width: 100%; padding: 6px 4px; border: 0; border-top: 1px solid #edf2f0; background: none; text-align: left; cursor: pointer; color: var(--body); }
.proj li button:hover { background: #f1f5f3; }
.proj li button:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.proj li .dot { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--ink); }
.proj li .dot.need { background: #fff; border: 2px solid var(--ink); width: 11px; height: 11px; margin-top: 4px; }
.proj li .nm { color: var(--ink); font-weight: 600; font-size: 12.5px; overflow-wrap: anywhere; }
.proj li .mw { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; color: #122a26; text-align: right; white-space: nowrap; }
.proj li .mw.na { font-weight: 400; color: var(--muted); }
.proj li small { grid-column: 2 / -1; color: var(--muted); font-size: 11.5px; }
.pauses { display: grid; gap: 6px; margin-top: 10px; }
.pauses .btn { text-align: left; }
.nojs { padding: 24px; }

/* tracker embed (?view=tracker): the page above supplies the title */
.bare .top { display: none; }
.bare #app { grid-template-rows: 1fr; }

/* phone: search, summary, map, timeline, controls stack; the page scrolls; the card is a bottom sheet */
@media (max-width: 720px) {
  html, body { height: auto; overflow: auto; }
  #app { height: auto; display: flex; flex-direction: column; overflow: visible; }
  .top { order: 0; padding: 8px 12px; gap: 8px; }
  .asof { width: 100%; margin: 0; }
  .search { order: 1; position: static; width: auto; margin: 10px 10px 0; }
  .search ul { position: absolute; left: 0; right: 0; max-height: 50vh; z-index: 6; }
  .summary { order: 2; position: static; max-width: none; margin: 8px 10px 0; gap: 5px; }
  .summary .stat { height: 34px; padding: 0 9px; }
  .summary .stat b { font-size: 15px; }
  #map { order: 3; height: 58vh; min-height: 340px; margin-top: 8px; }
  .time { order: 4; position: static; margin: 10px 10px 0; }
  .panel { order: 5; position: static; width: auto; max-height: none; margin: 10px; }
  .panel.is-collapsed { width: auto; }
  .card { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 46vh; border-radius: 14px 14px 0 0; border-left: 0; border-right: 0; border-bottom: 0; box-shadow: 0 -10px 30px -12px rgb(15 56 51 / .45); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .bare #app { display: flex; }
  .bare #map { height: 430px; margin-top: 0; }
}
.reset-btn { font-size: 18px; line-height: 1; font-weight: 600; color: #0f3833; }

.sw--soon { width: 12px; height: 12px; background: none; border: 1.6px solid var(--teal); }
.summary .mapped { margin: 0; align-self: center; font-size: 11.5px; color: var(--muted); background: rgb(255 255 255 / .85); padding: 3px 8px; border-radius: 8px; }
.maplibregl-popup.hover .soon { display: block; color: #0a6f6f; font-weight: 600; }
.card .soon-note { margin: 8px 0 0; padding: 6px 10px; border-left: 3px solid var(--teal); background: #eaf6f5; border-radius: 4px; font-size: 12.5px; color: var(--ink); }
.panel.is-collapsed { box-shadow: var(--shadow); }
.panel.is-collapsed .panel__head { padding: 8px 12px; }
.panel.is-collapsed .panel__title { font-weight: 600; }
