/* Taskyard pages (1/2): the board (browse), your jobs, workshop, tally board, pay book, account.
   Shared yard bits live here too: .y-pin, .y-tape, pegboard areas, stencil numbers, tables, pills.
   Prefixes: pg- shared, br- board, rp- jobs, cr- workshop, st- tally board, ea- pay book, ac- account. */

/* Fallback tokens (zero specificity): the core stylesheet's values always win. */
:where(:root) {
  --bg: #f3ecdf; --bg-2: #e9e0cf; --surface: #fffbf3; --ink: #201d1a; --ink-2: #4a443c; --muted: #7a7264;
  --line: #ddd2bf; --line-2: #c8bba3; --orange: #f25c05; --orange-ink: #b84300; --orange-soft: #ffe3cf;
  --steel: #2b3a42; --steel-2: #36474f; --tape: #f6c445; --good: #2f7d4a; --bad: #c2362b;
  --sans: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Red Hat Mono", ui-monospace, "Cascadia Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --card-shadow: 0 1px 0 rgba(32, 29, 26, 0.08), 0 10px 22px -14px rgba(32, 29, 26, 0.35);
  --peg: radial-gradient(circle, rgba(32, 29, 26, 0.13) 1.5px, transparent 2px) 0 0 / 22px 22px;
}

/* ---------- yard bits ---------- */
.y-pin { position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 3px rgba(242, 92, 5, 0.2), 0 2px 3px rgba(32, 29, 26, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.16); z-index: 2; }
.y-tape { display: block; height: 7px; width: 100%; max-width: 132px; margin-top: 18px; background: repeating-linear-gradient(-45deg, var(--orange) 0 7px, var(--ink) 7px 14px); border-radius: 1px; }
.pegboard { background: var(--peg), var(--bg-2); }

.pg-head { position: relative; margin: 8px 0 28px; }
.pg-head h1 { font-family: var(--display, "Big Shoulders Stencil Display", sans-serif); font-size: clamp(2.6rem, 8vw, 4.4rem); font-weight: 800; line-height: 0.95; letter-spacing: 0.005em; text-transform: uppercase; margin: 6px 0 0; }
.pg-head .lede { margin: 14px 0 0; }
.pg-section { margin: 52px 0 0; }
.pg-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.pg-section-head h2 { font-family: var(--display, "Big Shoulders Stencil Display", sans-serif); font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 800; line-height: 1; text-transform: uppercase; letter-spacing: 0.005em; margin: 0; }
.pg-small { font: 500 0.72rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); margin: 0 0 10px; }

.pg-node { position: relative; display: inline-block; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--tape); box-shadow: 0 0 0 1.5px var(--ink); }

/* square emblem tile on the category colour */
.pg-tile { flex: none; width: 52px; height: 52px; border-radius: 6px; background: var(--cat, var(--orange)); color: #fff; display: grid; place-items: center; position: relative; overflow: hidden; }
.pg-tile svg { width: 78%; height: 78%; }
.pg-tile .glyph { width: 58%; height: 58%; }
.pg-tile-s { width: 40px; height: 40px; }
.pg-tile-l { width: 72px; height: 72px; }
.pg-tile-person { background: var(--steel); font: 800 1.1rem var(--sans); }

.pg-pill { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; height: 26px; padding: 0 10px; border-radius: 4px; font: 500 0.68rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }
.pg-pill.pg-done { background: #e3f0e4; color: #1f6238; border-color: #c4dcc7; }
.pg-pill.pg-failed { background: #f8e2de; color: #a02c22; border-color: #e9bfb8; }
.pg-pill.pg-running { background: var(--steel); color: #fff; border-color: var(--steel); }
.pg-pill.pg-draft { background: var(--bg-2); color: var(--muted); }
.pg-running .pg-node { box-shadow: none; }
.pg-running .pg-node::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--tape); opacity: 0; }
.js .pg-running .pg-node::after { animation: pg-ping 1.8s var(--ease) infinite; }
@keyframes pg-ping { 0% { transform: scale(1); opacity: 0.9; } 100% { transform: scale(2.6); opacity: 0; } }


/* tables: ruled ledger paper */
.pg-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--card-shadow); }
.pg-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.pg-table th, .pg-table td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pg-table thead th { font: 500 0.68rem var(--mono); text-transform: uppercase; letter-spacing: 0.07em; color: var(--bg); background: var(--steel); border-bottom: 0; padding-top: 11px; padding-bottom: 11px; }
.pg-table tbody tr:last-child td { border-bottom: 0; }
.pg-table tbody tr { transition: background-color 0.15s; }
.pg-table tbody tr:hover { background: var(--orange-soft); }
.pg-table td small { display: block; color: var(--muted); font-size: 0.78rem; line-height: 1.4; margin-top: 2px; }
.pg-table td a { font-weight: 700; text-decoration: none; color: var(--orange-ink); }
.pg-table td a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pg-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pg-table .neg { color: var(--bad); }
.pg-table .pos { color: var(--good); }
.pg-table tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; background: var(--bg-2); font: 500 0.78rem var(--mono); text-transform: uppercase; letter-spacing: 0.06em; }
.pg-table tfoot .num { text-transform: none; font-size: 0.92rem; color: var(--ink); }
.show-s { display: none !important; }

/* ---------- the board (browse) ---------- */

.br-board { background: var(--peg), var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 30px 14px 22px; }
.br-grid { display: grid; grid-template-columns: 1fr; gap: 30px 18px; }

.bio-form { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.bio-form input { flex: 1 1 200px; min-width: 0; }

/* ---------- tally board ---------- */


/* ---------- desktop ---------- */
@media (min-width: 640px) {
  .br-grid { grid-template-columns: repeat(2, 1fr); }
  .br-board { padding: 34px 22px 26px; }
}
@media (min-width: 900px) {
  .br-grid { grid-template-columns: repeat(3, 1fr); }
  .br-grid > :nth-child(3n+2) { margin-top: 22px; }
}
@media (min-width: 1100px) {
  .br-grid { grid-template-columns: repeat(3, 1fr); gap: 34px 22px; }
}

/* ---------- phones: tabs show one board at a time ---------- */
@media (max-width: 899px) {
}
@media (max-width: 420px) {
  .pg-table th, .pg-table td { padding: 11px 12px; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
}

