/* ══════════════════════════════════════════════════════════════════════════
   Observatory + Workbench. Builds on the tokens and components in landing.css.
   ══════════════════════════════════════════════════════════════════════════ */

.page-head { max-width: 40em; padding: 44px 0 36px; }
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 14px; }
.page-head p { color: var(--muted); font-size: 1.08rem; }

.empty-state, .page-note {
  color: var(--muted); text-align: center;
  background: var(--surface-glass); border: 1px dashed var(--border);
  border-radius: var(--r-lg); padding: 28px 24px;
}
.page-note { border: 0; background: none; padding: 28px 0 0; font-size: 0.92rem; color: var(--muted-soft); }

/* ── Shared bits ── */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 4px 11px; border-radius: var(--r-pill);
  background: var(--surface-alt); color: var(--accent-ink); border: 1px solid var(--border);
}
.pill-live, .pill-active   { background: var(--success-bg); color: var(--success-fg); border-color: var(--success-border); }
.pill-live::before, .pill-active::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-archived, .pill-paused { color: var(--muted); }
.pill-shipped { background: var(--accent-ink); color: var(--on-accent); border-color: transparent; }
.pill-quiet { text-transform: none; letter-spacing: 0; font-weight: 600; font-size: 0.76rem; background: transparent; }

.map-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.map-sub { color: var(--accent-ink); font-weight: 600; margin-bottom: 10px; }

.prose { color: var(--muted); line-height: 1.68; overflow-wrap: anywhere; }
.prose p + p { margin-top: 10px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin-top: 14px; }
.tags li {
  font-family: 'JetBrains Mono', monospace; font-size: 0.74rem;
  padding: 3px 9px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border-soft); color: var(--muted);
}

/* ══════════════════════════════ OBSERVATORY ══════════════════════════════ */
.map-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }

.map-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden;
}

.map-view {
  position: relative; aspect-ratio: 16 / 9;
  background: var(--surface-alt); border-bottom: 1px solid var(--border-soft);
  overflow: hidden;
}
.map-view img, .map-view iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.map-stamp {
  position: absolute; top: 12px; left: 12px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: rgba(20,15,10,0.55); color: #f4ead8;
}
.map-view.is-live { aspect-ratio: 16 / 9; }
/* A loaded map gets a full row, so it's big enough to use and doesn't stretch its neighbour. */
.map-card.is-live { grid-column: 1 / -1; }
@media (max-width: 640px) { .map-view.is-live { aspect-ratio: 3 / 4; } }

/* No screenshot yet: a little contour-map motif instead of a grey box. */
.map-placeholder {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    repeating-radial-gradient(circle at 30% 60%, transparent 0 18px, var(--hairline) 18px 20px),
    repeating-radial-gradient(circle at 78% 30%, transparent 0 14px, var(--hairline) 14px 16px),
    linear-gradient(150deg, var(--surface-2), var(--surface-alt));
}
.map-placeholder span {
  font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent);
  background: var(--surface-glass-strong); padding: 6px 14px; border-radius: var(--r-pill);
  border: 1px solid var(--border);
}

.map-load {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%);
  font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  padding: 10px 20px; border-radius: var(--r-md);
  background: var(--surface); color: var(--accent-ink);
  border: 1px solid var(--border-strong);
  white-space: nowrap; transition: background .2s;
}
.map-load:hover { background: var(--surface-alt); }
.map-load[hidden] { display: none; }

.map-body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.map-body h2 { font-size: 1.5rem; margin-bottom: 6px; }
.map-address { margin-top: 12px; color: var(--muted); font-size: 0.94rem; }
.map-address code { color: var(--ink-soft); background: var(--surface-2); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border-soft); }
/* Pins the button to the bottom so cards in a row line up. */
.card-foot { margin-top: auto; padding-top: 22px; }

/* ══════════════════════════════ WORKBENCH ══════════════════════════════ */
.bench-group { margin-bottom: 56px; }
.bench-heading {
  font-size: 1.4rem; margin-bottom: 16px;
  display: flex; align-items: baseline; gap: 10px;
}
.bench-count { font-size: 0.82rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }

/* One post per row: status and progress, then the text, then a screenshot. */
.bench-rows {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.bench-row {
  display: grid; grid-template-columns: 170px minmax(0, 1fr) 200px;
  gap: 28px; padding: 24px 26px; align-items: start;
}
.bench-row + .bench-row { border-top: 1px solid var(--border-soft); }
.bench-side { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.bench-date { font-size: 0.74rem; color: var(--muted-soft); }
.bench-progress { width: 100%; }
.bench-main { min-width: 0; }
.bench-main h3 { font-size: 1.3rem; margin-bottom: 6px; }
.bench-main .prose { max-width: 68ch; }
.bench-thumb {
  display: block; border: 1px solid var(--border-soft); border-radius: var(--r-md);
  overflow: hidden; background: var(--surface-alt);
}
.bench-thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.bench-thumb:hover { border-color: var(--accent-deep); }
.bench-link { margin-top: 16px; padding: 9px 18px; font-size: 0.92rem; }

@media (max-width: 860px) {
  .bench-row { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px 18px; }
  .bench-side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .bench-progress { flex-basis: 100%; max-width: 320px; }
  .bench-thumb { max-width: 320px; }
}

/* ── Long posts: clamped with a fade until "Read more" ── */
.bench-text.is-clamped,
.owner-quote-text.is-clamped {
  overflow: hidden;
  transition: max-height .35s var(--ease);
}
.bench-text.is-clamped { max-height: calc(1.68em * 4); }
.owner-quote-text.is-clamped { max-height: calc(1.62em * 3); }
.bench-row:not(.is-open) .is-clamped {
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
          mask-image: linear-gradient(to bottom, #000 55%, transparent);
}
.bench-row.is-open .is-clamped { max-height: none; }

.bench-toggle {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 10px;
  font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer;
  padding: 0; background: none; border: 0; color: var(--accent-ink);
  text-decoration: underline; text-underline-offset: 3px;
}
.bench-toggle[hidden] { display: none; }
.bench-toggle-icon { transition: transform .3s var(--ease); }
.bench-row.is-open .bench-toggle-icon { transform: rotate(180deg); }

/* ── "A word from the owner" ── */
.owner-quote {
  margin: 16px 0 2px; padding: 14px 18px; max-width: 68ch;
  background: var(--surface-2); border: 1px solid var(--border-soft); border-radius: var(--r-md);
}
.owner-quote-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-ink); margin-bottom: 6px;
}
.owner-quote-text { color: var(--ink-soft); font-style: italic; line-height: 1.62; }
.owner-quote-by { margin-top: 8px; font-weight: 700; font-size: 0.9rem; color: var(--accent-ink); }
/* Progress widths as classes, because the CSP forbids inline style attributes. */
.pw-0 { width: 0%; }
.pw-5 { width: 5%; }
.pw-10 { width: 10%; }
.pw-15 { width: 15%; }
.pw-20 { width: 20%; }
.pw-25 { width: 25%; }
.pw-30 { width: 30%; }
.pw-35 { width: 35%; }
.pw-40 { width: 40%; }
.pw-45 { width: 45%; }
.pw-50 { width: 50%; }
.pw-55 { width: 55%; }
.pw-60 { width: 60%; }
.pw-65 { width: 65%; }
.pw-70 { width: 70%; }
.pw-75 { width: 75%; }
.pw-80 { width: 80%; }
.pw-85 { width: 85%; }
.pw-90 { width: 90%; }
.pw-95 { width: 95%; }
.pw-100 { width: 100%; }

@media (max-width: 640px) {
  .page-head { padding: 24px 0 26px; }
  .map-body { padding: 20px 20px 22px; }
  .map-load { font-size: 0.84rem; padding: 9px 16px; }
}
