/* The Southwest Day / Twilight / Night token table comes from
   /pinon-ui.css (PinonUICore) now -- the same values docs/THEME.md
   locked, in the material names this file already used, plus the
   lifecycle tokens (--cactus, --chile, --ochre). What stays here is
   PinonPM's alone: the spacing and type scale, and every page-level
   rule. Keep page-specific styles (tables, board, chips) local to the
   page instead of adding them here. */
:root {
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --text-page: 1.15rem;
  --text-section: .95rem;
  --text-sub: .9rem;
}
.claim-chip {
  display: inline-block; font-size: .75rem; padding: 1px var(--space-2); border-radius: 999px;
  border: 1px solid var(--line); white-space: nowrap;
}
.claim-chip.live { color: var(--turquoise); border-color: var(--turquoise); }
.claim-chip.stale { color: var(--resin); border-color: var(--resin); }
.claim-chip .claim-age { opacity: .8; }
.claim-none { color: var(--muted); }
.claim-chip.live .claim-status { font-weight: 650; }
@keyframes claim-working-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--turquoise) 50%, transparent); }
  50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--turquoise) 28%, transparent); }
}
.claim-chip.live { animation: claim-working-pulse 1.6s ease-in-out infinite; }
.claim-chip.here { color: var(--ink); border-color: var(--line); }
.claim-live-bar {
  font-size: .85rem; color: var(--turquoise); border: 1px solid var(--turquoise);
  border-radius: 4px; padding: var(--space-2) var(--space-3); margin-bottom: var(--space-3);
}
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
}
header {
  display: flex; gap: var(--space-4); align-items: center; flex-wrap: wrap;
  padding: var(--space-3) var(--space-4); background: var(--panel); color: var(--ink);
  border-bottom: 1px solid var(--line);
}
header h1 { font-family: var(--font-display); font-size: var(--text-page); margin: 0; font-weight: 600; color: var(--sage); }
header a.navlink { font-size: .8rem; color: var(--turquoise); text-decoration: none; }
header a.navlink:hover { text-decoration: underline; }
header a.navlink.gear {
  display: inline-flex; align-items: center; color: var(--ink);
}
header a.navlink.gear svg { width: 1.25rem; height: 1.25rem; }
header a.navlink.gear:hover { color: var(--turquoise); text-decoration: none; }
header .tag { font-size: .75rem; color: var(--muted); }
header .tag.clickable { cursor: pointer; text-decoration: underline; text-decoration-style: dotted; margin-left: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
header .context {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  flex: 0 1 14rem; min-width: 12rem;
}
header .context select {
  background: transparent; border: none; padding: 0; max-width: 28rem;
  cursor: pointer; font-family: var(--font-ui);
}
header .context #orgSelect {
  font-family: var(--font-display); font-size: var(--text-page); font-weight: 600;
  color: var(--sage);
}
header .context #projectSelect {
  font-size: .95rem; color: var(--muted); font-weight: 500;
}
header a.gear {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); text-decoration: none;
  width: 2rem; height: 2rem; border-radius: 4px;
  font-size: 1.25rem; line-height: 1;
}
header a.gear:hover { color: var(--ink); background: var(--paper); }
header .consult {
  display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap;
  flex: 1 1 16rem; min-width: 12rem;
}
header .consult[hidden] { display: none; }
header .consult select, header .consult input {
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px;
  padding: var(--space-1) var(--space-2);
}
header .consult #consultRole { max-width: 12rem; }
header .consult #consultQuestion { flex: 1 1 10rem; min-width: 8rem; }
header .consult details { font-size: .75rem; color: var(--muted); }
header .consult details summary { cursor: pointer; }
#consultStatus, #consultAnswer { width: 100%; }
#consultAnswer {
  white-space: pre-wrap; font-size: .88rem; margin: 0 var(--space-4);
}
/* View selector lives in the existing header, not a second sticky nav.
   Look stolen from the public shell's #shellNav: text links, ink, no
   underline until active. */
#viewSelector {
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); align-items: center;
}
#viewSelector a {
  color: var(--ink); font-size: .85rem; text-decoration: none;
  border-bottom: 2px solid transparent; padding-bottom: 2px;
}
#viewSelector a.active { font-weight: 650; color: var(--ink); border-bottom-color: var(--resin); }
#theme-mode {
  font-family: var(--font-ui); font-size: .85rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: var(--space-1) var(--space-2);
}
main { padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); max-width: min(96rem, 96vw); margin: 0 auto; }
main.narrow { max-width: 34rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: var(--space-4); }
.panel h2 { font-family: var(--font-display); font-size: var(--text-section); margin: 0 0 var(--space-3); color: var(--ink); }
.panel.collapsed { display: none; }
.row { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: var(--space-2); }
label { font-size: .8rem; color: var(--muted); }
input, select, textarea {
  font-family: var(--font-ui); font-size: .9rem; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 4px; padding: var(--space-1) var(--space-2);
}
input[type=text], input[type=password] { min-width: 22rem; }
textarea { width: 100%; min-height: 8rem; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
/* Size to the label. `.col` is a column flex (align-items: stretch by
   default) and would otherwise turn every stacked-form button into a
   full-width bar. Form fields still fill the column; that's their job. */
button {
  font-family: var(--font-ui); font-size: .85rem; color: var(--paper); background: var(--sage);
  border: none; border-radius: 4px; padding: var(--space-2) var(--space-3); cursor: pointer;
  width: max-content;
}
button:hover { opacity: .9; }
button.ghost { color: var(--ink); background: transparent; border: 1px solid var(--line); }
.link-btn { background: transparent; color: var(--turquoise); border: none; padding: 0; font-size: .8rem; text-decoration: underline; cursor: pointer; }
.empty, .error, .muted { color: var(--muted); font-size: .85rem; }
.error { color: var(--resin); }
.success { color: var(--sage); font-size: .85rem; }
code.kv { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 1px var(--space-2); }
