/* The Routines board (wave145, 2026-10-26) — Billdr's Routines shape in the
 * Rookery's own dress: cards on the design-system tokens, gold only for the
 * one main action (Make your own), persona chips in the violet family. */

.rt-wrap { max-width: none; margin: 0 auto; padding: 18px 20px 48px; }
.rt-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 6px; }
.rt-head h2 { margin: 0; color: var(--ds-navy); font-size: 22px; }
.rt-lede { color: var(--ds-muted); font-size: 13.5px; margin: 4px 0 18px; max-width: 760px; line-height: 1.5; }
.rt-make { margin-left: auto; flex: none; }

.rt-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 1080px) { .rt-grid { grid-template-columns: minmax(0, 1fr); } }

.rt-sec-title { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-faint); margin: 18px 0 10px; }
.rt-sec-title:first-child { margin-top: 0; }

.rt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.rt-card { background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; }
.rt-card.off { opacity: .78; }
.rt-card-top { display: flex; align-items: center; gap: 8px; }
.rt-name { font-weight: 600; color: var(--ds-navy); font-size: 15px; margin-right: auto; }
.rt-persona { font-size: 11px; font-weight: 600; color: #2A095E; background: #EFEAF7; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.rt-kind { font-size: 12px; color: var(--ds-muted); }
.rt-kind .rt-free { color: #2e7d4f; font-weight: 600; }
.rt-kind .rt-spend { color: var(--ds-gold-ink); font-weight: 600; }
.rt-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.rt-tag { font-size: 11px; color: var(--ds-muted); border: 1px solid var(--ds-line); border-radius: 999px; padding: 1px 8px; }
.rt-meta { font-size: 12.5px; color: var(--ds-muted); line-height: 1.55; }
.rt-meta b { color: var(--ds-ink); font-weight: 600; }
.rt-warn { font-size: 12.5px; color: #8a5a00; background: var(--ds-gold-tint); border: 1px solid var(--ds-gold-line); border-radius: 8px; padding: 6px 9px; line-height: 1.45; }
.rt-brief { font-size: 12.5px; color: var(--ds-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.rt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.rt-btn { border: 1px solid var(--ds-line-strong); background: #fff; color: var(--ds-ink); border-radius: 8px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; }
.rt-btn:hover { background: var(--ds-tint); }
.rt-btn.armed { border-color: var(--ds-gold-strong); background: var(--ds-gold-tint); color: var(--ds-gold-ink); font-weight: 600; }
.rt-btn.danger:hover { border-color: #c0564f; color: #a03a34; }
.rt-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ds-muted); cursor: pointer; }
.rt-empty { border: 1px dashed var(--ds-line-strong); border-radius: 12px; padding: 22px; color: var(--ds-muted); font-size: 13.5px; text-align: center; }

.rt-rail { background: var(--ds-card); border: 1px solid var(--ds-line); border-radius: 12px; padding: 6px 0; }
.rt-run { padding: 10px 14px; border-bottom: 1px solid var(--ds-hair); }
.rt-run:last-child { border-bottom: none; }
.rt-run-top { display: flex; gap: 8px; align-items: baseline; }
.rt-run-name { font-weight: 600; color: var(--ds-ink); font-size: 13px; margin-right: auto; }
.rt-run-when { font-size: 11.5px; color: var(--ds-faint); white-space: nowrap; }
.rt-run-state { font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.rt-run-state.ran { color: #2e7d4f; }
.rt-run-state.failed { color: #a03a34; }
.rt-run-state.off { color: var(--ds-faint); }
.rt-run-state.test { color: var(--ds-gold-ink); }
.rt-run-sum { font-size: 12.5px; color: var(--ds-muted); line-height: 1.5; margin-top: 2px; }
.rt-run-report { font-size: 12.5px; color: var(--ds-ink); line-height: 1.55; white-space: pre-wrap; margin-top: 6px; background: var(--ds-tint); border-radius: 8px; padding: 8px 10px; max-height: 260px; overflow: auto; }
.rt-run details summary { font-size: 12px; color: var(--ds-gold-ink); cursor: pointer; margin-top: 4px; }

.rt-dialog-back { position: fixed; inset: 0; background: rgba(11, 34, 53, .45); display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; z-index: 60; overflow: auto; }
.rt-dialog { background: #fff; border-radius: 14px; max-width: 560px; width: 100%; padding: 20px 22px; }
.rt-dialog h3 { margin: 0 0 4px; color: var(--ds-navy); font-size: 17px; }
.rt-dialog .rt-dsub { color: var(--ds-muted); font-size: 12.5px; margin-bottom: 14px; line-height: 1.5; }
.rt-field { margin-bottom: 12px; }
.rt-field label { display: block; font-size: 12px; font-weight: 600; color: var(--ds-ink); margin-bottom: 4px; }
.rt-field input[type="text"], .rt-field input[type="time"], .rt-field select, .rt-field textarea {
  width: 100%; box-sizing: border-box; border: 1px solid var(--ds-line-strong); border-radius: 8px; padding: 7px 9px; font-size: 13.5px; background: #fff; color: var(--ds-ink);
}
.rt-field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.rt-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.rt-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rt-checks label { font-size: 12.5px; font-weight: 400; color: var(--ds-ink); display: inline-flex; gap: 5px; align-items: center; margin: 0; }
.rt-note { font-size: 12px; color: var(--ds-muted); background: var(--ds-fill); border-radius: 8px; padding: 8px 10px; line-height: 1.5; }
.rt-dialog-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* wave146 — Billdr's shape: Browse catalog tile + catalog dialog + reports filter */
.rt-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex: none; }
.rt-head-actions .rt-make { margin-left: 0; }
.rt-browse { font-size: 13px; padding: 7px 13px; }
.rt-tile { border: 1.5px dashed var(--ds-line-strong); background: transparent; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; cursor: pointer; text-align: left; font: inherit; }
.rt-tile:hover { background: var(--ds-tint); }
.rt-tile-plus { font-size: 20px; line-height: 1; color: var(--ds-gold-ink); font-weight: 700; }
.rt-tile-name { font-weight: 600; color: var(--ds-navy); font-size: 15px; }
.rt-tile-sub { font-size: 12.5px; color: var(--ds-muted); }
.rt-onboard { font-size: 12.5px; font-weight: 600; color: #2e7d4f; padding: 5px 2px; }
.rt-rail-filter { margin-bottom: 8px; }
.rt-rail-filter select { width: 100%; box-sizing: border-box; border: 1px solid var(--ds-line-strong); border-radius: 8px; padding: 6px 8px; font-size: 13px; background: #fff; color: var(--ds-ink); }
.rt-dialog.rt-catalog { max-width: 880px; }
.rt-cat-tools { display: flex; gap: 8px; margin-bottom: 14px; }
.rt-cat-tools input[type="text"] { flex: 1; box-sizing: border-box; border: 1px solid var(--ds-line-strong); border-radius: 8px; padding: 7px 9px; font-size: 13.5px; }
.rt-cat-tools select { box-sizing: border-box; border: 1px solid var(--ds-line-strong); border-radius: 8px; padding: 7px 9px; font-size: 13.5px; background: #fff; }
.rt-cat-grid { max-height: 62vh; overflow: auto; padding: 2px; }

/* ---- wave590-fullwidth (2026-11-11): the wrapper cap comes off
 * in EVERY rail state. Micheal ruled 2026-10-16 that every
 * portal screen fills the whole window; the shell cap came off
 * then, but this page kept its own 1240px wrapper cap. The
 * Nov 10 fix (wave550, in styles.css) lifted the cap only while
 * the rail was collapsed — his 2026-11-11 screenshots of
 * Obligations and Inventory with the sidebar EXPANDED, stopped
 * mid-screen, settle it for the whole capped set: the
 * collapsed-only lift is superseded, uncapped here in all
 * states. (margin: 0 auto stays — harmless at full width.) ---- */
.rt-wrap { max-width: none; }

/* ---- wave596-routineswidth (2026-11-11): the cap comes off AT
 * THE SOURCE, not only by appendix. wave590 left the base rule
 * at the top of this file reading max-width: 1240px and relied
 * on the EOF override above to outrank it — same specificity,
 * later position. That override DOES win in a fresh render of
 * the served chain (Hana's 119-stylesheet probe, 2026-11-11:
 * computed max-width "none", wrap spanning the #app column),
 * but the owner's screenshot that morning still showed the
 * 1240px column, centred — the base rule winning unopposed on
 * a page copy that never picked up the appendix (a restored /
 * long-lived tab holds the pre-wave590 file, where line 5's
 * cap is the last word; the house lesson stands: a deployed
 * tab still runs old code until a fresh tab replaces it).
 * So: the base rule itself now reads max-width: none (top of
 * file), the override above stays as the last word, and the
 * scoped rule below outranks ANY single-class .rt-wrap cap
 * (specificity (1,1,0) over (0,1,0)) wherever one might ride
 * in from. The two-column stretch is the base .rt-grid's own
 * shape — cards column flexible (minmax(0, 1fr), the card
 * grid auto-fills more columns as width grows), the Reports
 * rail fixed at 340px at the right edge; the ≤1080px
 * single-column step-down above is untouched, as is the
 * .rt-lede 760px reading measure (a paragraph's measure,
 * not the page shell). ---- */
#view-routines .rt-wrap { max-width: none; }
