/* The Island — a live window into Bonaire.
   A control room: dark monitors, amber accent (the Bid'i Kunuku gold),
   tabular numbers. Server-rendered SVG charts read the series colours below. */

:root {
  --bg: #0e0f10;
  --panel: #16181a;
  --panel-2: #1c1f22;
  --line: #2a2e33;
  --ink: #e9e5dc;
  --ink-2: #a7a29a;
  --ink-3: #6f6b65;
  --amber: #e0a23a;
  --coral: #e8735a;
  --sea: #4fb3c8;
  --leaf: #7cc47a;
  --violet: #a88be0;
  --rec: #e5484d;
  --radius: 10px;
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body.isl-body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
a { color: inherit; }

.isl { max-width: 1320px; margin: 0 auto; padding: 0 20px 40px; }

/* header */
.isl-head { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 18px 0 12px; }
.isl-brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.isl-brand-sub { color: var(--ink-3); font-weight: 400; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.isl-rec { width: 10px; height: 10px; border-radius: 50%; background: var(--rec); align-self: center; box-shadow: 0 0 0 4px rgba(229, 72, 77, .18); animation: isl-blink 2s infinite; }
@keyframes isl-blink { 50% { opacity: .35; } }
.isl-clock { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; font-family: var(--mono); color: var(--ink-2); }
.isl-clock-time { font-size: 24px; color: var(--ink); font-weight: 600; }
.isl-clock-weather { text-transform: capitalize; color: var(--sea); }

/* nav */
.isl-nav { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.isl-nav-link { padding: 10px 14px; text-decoration: none; color: var(--ink-2); border-bottom: 2px solid transparent; white-space: nowrap; }
.isl-nav-link:hover { color: var(--ink); }
.isl-nav-link.is-active { color: var(--amber); border-bottom-color: var(--amber); }

.isl-foot { margin-top: 32px; color: var(--ink-3); font-size: 13px; }
.isl-note, .isl-empty { color: var(--ink-3); font-size: 13px; }
.isl-more { display: inline-block; margin-top: 10px; color: var(--amber); text-decoration: none; font-size: 14px; }
h1.isl-title { font-size: 26px; margin: 4px 0 4px; }
.isl-lede { color: var(--ink-2); margin: 0 0 18px; max-width: 70ch; }

/* tiles */
.isl-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.isl-tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 8px; display: flex; flex-direction: column; min-width: 0; }
.isl-tile-label { color: var(--ink-3); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.isl-tile-value { font: 600 24px/1.25 var(--mono); margin-top: 2px; overflow-wrap: anywhere; }
.isl-tile-sub { color: var(--ink-3); font-size: 12px; }
.isl-spark { width: 100%; height: 28px; margin-top: 6px; }
.isl-spark path { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.tone-amber .isl-spark path { stroke: var(--amber); }
.tone-coral .isl-spark path { stroke: var(--coral); }
.tone-sea .isl-spark path { stroke: var(--sea); }
.tone-leaf .isl-spark path { stroke: var(--leaf); }
.tone-violet .isl-spark path { stroke: var(--violet); }

/* panels */
.isl-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.isl-grid-live { grid-template-columns: 1.3fr 1fr 1fr; }
.isl-span-feed { grid-row: span 2; }
.isl-span-2 { grid-column: span 2; }
.isl-span-all { grid-column: 1 / -1; }
.isl-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; display: flex; flex-direction: column; }
.isl-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px 0; }
.isl-panel-head h2 { font-size: 15px; margin: 0; font-weight: 600; }
.isl-cam { font: 11px var(--mono); color: var(--ink-3); letter-spacing: .08em; white-space: nowrap; }
.isl-panel-body { padding: 10px 14px 14px; min-width: 0; }

/* feed */
.isl-feed { list-style: none; margin: 0; padding: 0; max-height: 640px; overflow-y: auto; }
.isl-feed li { display: grid; grid-template-columns: 92px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.isl-feed-when { font: 12px var(--mono); color: var(--ink-3); padding-top: 2px; }
.isl-feed-text { text-decoration: none; }
.isl-feed a.isl-feed-text:hover { color: var(--amber); }
.isl-feed .k-born .isl-feed-text, .isl-feed .k-imported .isl-feed-text { color: var(--leaf); }
.isl-feed .k-died .isl-feed-text, .isl-feed .k-alarm .isl-feed-text { color: var(--coral); }
.isl-feed .k-delivered .isl-feed-text, .isl-feed .k-contract .isl-feed-text { color: var(--amber); }
.isl-feed .k-worked .isl-feed-text { color: var(--sea); }

/* bars */
.isl-bars { list-style: none; margin: 0; padding: 0; }
.isl-bars li { display: grid; grid-template-columns: minmax(90px, 40%) 1fr 56px; gap: 8px; align-items: center; padding: 3px 0; font-size: 14px; }
.isl-bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.isl-bar-label a { text-decoration: none; }
.isl-bar-label a:hover { color: var(--amber); }
.isl-bar-track { height: 8px; background: var(--panel-2); border-radius: 4px; overflow: hidden; }
.isl-bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--amber); }
.isl-bars.sea .isl-bar-fill { background: var(--sea); }
.isl-bars.leaf .isl-bar-fill { background: var(--leaf); }
.isl-bars.coral .isl-bar-fill { background: var(--coral); }
.isl-bars.violet .isl-bar-fill { background: var(--violet); }
.isl-bar-value { font: 13px var(--mono); text-align: right; }

/* meters */
.isl-meter { display: inline-block; width: 64px; height: 7px; border-radius: 4px; background: var(--panel-2); overflow: hidden; vertical-align: middle; }
.isl-meter-fill { display: block; height: 100%; }
.m-hunger .isl-meter-fill { background: var(--coral); }
.m-thirst .isl-meter-fill { background: var(--sea); }
.m-energy .isl-meter-fill { background: var(--amber); }
.m-morale .isl-meter-fill { background: var(--violet); }
.isl-meter.is-bad { outline: 1px solid var(--rec); }
.isl-needs { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.isl-needs .isl-meter { width: 100%; }

/* map */
.isl-map { width: 100%; max-height: 460px; display: block; }
.isl-map-land { fill: #1f2a22; stroke: #34453a; stroke-width: 1; }
.isl-map-dot { fill: rgba(233, 229, 220, .75); stroke: var(--bg); stroke-width: .6; }
.isl-map-dot.home { fill: rgba(224, 162, 58, .8); }
.isl-map a:hover .isl-map-dot { fill: var(--sea); }

/* charts */
.isl-chart { margin: 0; }
.isl-chart svg { width: 100%; height: auto; display: block; }
.isl-chart-grid line { stroke: var(--line); stroke-width: 1; }
.isl-chart-grid text, .isl-chart-x { fill: var(--ink-3); font: 10px var(--mono); }
.isl-line { fill: none; stroke-width: 2; }
.isl-area { opacity: .12; }
.isl-series.amber .isl-line { stroke: var(--amber); } .isl-series.amber .isl-area { fill: var(--amber); }
.isl-series.coral .isl-line { stroke: var(--coral); } .isl-series.coral .isl-area { fill: var(--coral); }
.isl-series.sea .isl-line { stroke: var(--sea); } .isl-series.sea .isl-area { fill: var(--sea); }
.isl-series.leaf .isl-line { stroke: var(--leaf); } .isl-series.leaf .isl-area { fill: var(--leaf); }
.isl-series.violet .isl-line { stroke: var(--violet); } .isl-series.violet .isl-area { fill: var(--violet); }
.isl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.isl-key::before { content: ""; display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.isl-key.amber::before { background: var(--amber); } .isl-key.coral::before { background: var(--coral); }
.isl-key.sea::before { background: var(--sea); } .isl-key.leaf::before { background: var(--leaf); } .isl-key.violet::before { background: var(--violet); }

/* tables */
.isl-table-wrap { overflow-x: auto; }
.isl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.isl-table th { text-align: left; color: var(--ink-3); font-weight: 500; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.isl-table th a { text-decoration: none; }
.isl-table th a.is-sorted { color: var(--amber); }
.isl-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.isl-table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.isl-table tr.is-bad td { color: var(--coral); }
.isl-table td a { text-decoration: none; }
.isl-table td a:hover { color: var(--amber); }
.isl-muted { color: var(--ink-3); }

/* spotlight and facts */
.isl-spot { display: flex; flex-direction: column; text-decoration: none; margin-bottom: 8px; }
.isl-spot-name { font-size: 20px; font-weight: 600; }
.isl-spot:hover .isl-spot-name { color: var(--amber); }
.isl-spot-line { color: var(--ink-2); font-size: 13px; text-transform: capitalize; }
.isl-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; font-size: 14px; }
.isl-facts dt { color: var(--ink-3); }
.isl-facts dd { margin: 0; }

/* filters */
.isl-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.isl-chip { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 13px; color: var(--ink-2); }
.isl-chip.is-active, .isl-chip:hover { border-color: var(--amber); color: var(--amber); }
.isl-search { background: var(--panel); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 6px 10px; font: inherit; min-width: 220px; }

/* person */
.isl-person-head { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-bottom: 14px; }
.isl-person-head h1 { margin: 0; font-size: 30px; }
.isl-person-sub { color: var(--ink-2); text-transform: capitalize; }
.isl-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.isl-pill { padding: 2px 9px; border-radius: 999px; background: var(--panel-2); font-size: 12px; color: var(--ink-2); }
.isl-pill.bad { color: var(--coral); }
.isl-list { margin: 0; padding-left: 18px; }
.isl-list li { padding: 2px 0; }
.isl-quote { font-size: 18px; margin: 0 0 6px; }
.isl-quote em { color: var(--amber); font-style: normal; }
.isl-traits { display: grid; grid-template-columns: max-content 1fr 36px; gap: 4px 10px; align-items: center; font-size: 13px; }

@media (max-width: 1000px) {
  .isl-grid-live { grid-template-columns: 1fr 1fr; }
  .isl-span-feed { grid-row: auto; grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .isl { padding: 0 16px 32px; }
  .isl-grid, .isl-grid-live { grid-template-columns: 1fr; }
  .isl-span-2 { grid-column: auto; }
  .isl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .isl-tile-value { font-size: 20px; }
  .isl-feed li { grid-template-columns: 1fr; gap: 0; }
  .isl-clock-time { font-size: 20px; }
}
.isl-table .tone-up { color: var(--coral); }
.isl-table .tone-down { color: var(--leaf); }
.isl-bars.wrap li { grid-template-columns: minmax(120px, 55%) 1fr 44px; }
.isl-bars.wrap .isl-bar-label { white-space: normal; }
.isl-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.isl-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .isl-grid-2, .isl-grid-3 { grid-template-columns: 1fr; } }
.isl-person-sub { text-transform: none; }
.isl-map-place { fill: rgba(124, 196, 122, .28); }

/* ── the kunuku dream (/island/kunukus, person page) ─────────────────── */
.isl-kunuku { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .isl-kunuku { grid-template-columns: 1fr; } }
.isl-kunuku-name { margin: 0 0 4px; font-size: 18px; color: var(--amber); }
.isl-design { width: 100%; height: auto; display: block; border-radius: 6px; background: #3b3326; }
.isl-design rect { stroke: rgba(0, 0, 0, 0.18); stroke-width: 0.5; }
.dm-soil { fill: #8a7350; }
.dm-rock { fill: #6f6a63; }
.dm-cliff { fill: #3f3a35; }
.dm-rooi { fill: #9fb6b0; }
.dm-fence { fill: #b07a3a; }
.dm-home { fill: #e7d3a8; }
.dm-shade { fill: #c9a96b; }
.dm-water { fill: var(--sea); }
.dm-animals { fill: var(--coral); }
.dm-transport { fill: var(--violet); }
.dm-food { fill: var(--leaf); }
.dm-gathering { fill: var(--amber); }
.dm-access { fill: #d8c49a; }
.isl-design .dm-plan { fill-opacity: 0.28; stroke: rgba(255, 255, 255, 0.35); stroke-dasharray: 2 2; }
.isl-design .dm-current { fill-opacity: 0.55; stroke: var(--amber); stroke-width: 1.5; }
.dm-sun { font-size: 11px; fill: rgba(255, 230, 120, 0.4); }
.dm-sun.built { fill: #ffe066; }
.isl-legend { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--ink-2); }
.dm-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: -6px; }
.dm-key.dm-fence { background: #b07a3a; } .dm-key.dm-home { background: #e7d3a8; } .dm-key.dm-water { background: var(--sea); }
.dm-key.dm-animals { background: var(--coral); } .dm-key.dm-transport { background: var(--violet); } .dm-key.dm-food { background: var(--leaf); }
.dm-key.dm-plan { background: transparent; border: 1px dashed var(--ink-2); }
.isl-kunuku-steps .st-built td { color: var(--leaf); }
.isl-kunuku-steps .st-current td { color: var(--amber); }
.isl-facts dd.bad { color: var(--coral); }
.isl-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.isl-gallery-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); font-size: 13px; }
.isl-gallery-card:hover strong { color: var(--amber); }
.isl-feed .k-made_it .isl-feed-text, .isl-feed .k-kunuku_complete .isl-feed-text, .isl-feed .k-permit_granted .isl-feed-text { color: var(--leaf); }
.isl-feed .k-setback .isl-feed-text, .isl-feed .k-permit_denied .isl-feed-text { color: var(--coral); }
.isl-feed .k-kunuku_built .isl-feed-text, .isl-feed .k-kunuku_hired .isl-feed-text { color: var(--amber); }
.isl-map-site { fill: rgba(200, 200, 200, .09); }

/* Businesses: the health column, coloured by tone */
.isl-table td .isl-spark { width: 90px; height: 22px; margin: 0; }
.isl-health { white-space: normal; max-width: 220px; }
.isl-health.tone-leaf { color: var(--leaf); }
.isl-health.tone-amber { color: var(--amber); }
.isl-health.tone-coral { color: var(--coral); }
.isl-health.tone-sea { color: var(--sea); }

/* A business's page */
.isl-back { margin: 0 0 6px; font-size: 14px; }
.isl-back a { color: var(--amber); text-decoration: none; }
.isl-table td.isl-neg { color: var(--coral); }

/* the Island map (/island/map) */
.isl-mapview { display: flex; flex-direction: column; gap: 0.6rem; }
.isl-map-tools { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; align-items: center; font-size: 0.9rem; }
.isl-map-tools button { font: inherit; padding: 0.2rem 0.7rem; border: 1px solid currentColor; border-radius: 4px; background: none; color: inherit; cursor: pointer; }
.isl-map-canvas { position: relative; height: min(78vh, 900px); border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 6px; overflow: hidden; background: #2b5d7a; }
.isl-map-canvas canvas { display: block; cursor: grab; }
.isl-map-canvas canvas:active { cursor: grabbing; }
.isl-map-tip { position: absolute; pointer-events: none; background: rgba(20, 18, 16, 0.85); color: #f4efe6; padding: 0.15rem 0.45rem; border-radius: 3px; font-size: 0.8rem; white-space: nowrap; }
.isl-map-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; list-style: none; margin: 0; padding: 0; font-size: 0.85rem; }
.isl-map-legend i { display: inline-block; width: 0.8rem; height: 0.8rem; margin-right: 0.35rem; vertical-align: -0.1rem; border: 1px solid rgba(0, 0, 0, 0.35); }
.isl-map-legend .k-road { background: #4a403a; }
.isl-map-legend .k-path { background: #8a5a2b; }
.isl-map-legend .k-rough { background: #d2694a; }
.isl-map-legend .k-ramada { background: #d9a441; }
.isl-map-legend .k-home { background: #4f8f5b; }
.isl-map-legend .k-moving { background: #c0392b; border-radius: 50%; }
.isl-map-card { position: absolute; top: 0.6rem; right: 0.6rem; max-width: 16rem; background: rgba(20, 18, 16, 0.88); color: #f4efe6; padding: 0.45rem 0.7rem; border-radius: 4px; font-size: 0.85rem; line-height: 1.4; }
.isl-map-card a { color: #f4efe6; font-weight: 600; }
.isl-map-card span { color: #cdbfa8; font-style: italic; }
