/* Direction C component styles.
   Source: docs/design/ui-refresh/design_handoff_team_page/styles.css

   All rules are scoped under .dir-c so they only take effect when an
   ancestor element opts into Direction C. Existing Tasker pages that
   don't apply .dir-c are unaffected. */

/* ─── Eyebrow (page-header role label) ────────────────────────── */

.dir-c .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}

/* Hat switcher — multi-hat user picks which role's composition to render.
   Lives inside .eyebrow.hat-switch; each .hat is a clickable filter and the
   active one gets the accent ink colour. Single-hat users see the static
   eyebrow above (no switcher). */
.dir-c .eyebrow.hat-switch .hat {
  color: var(--ink-3);
  text-decoration: none;
}

.dir-c .eyebrow.hat-switch .hat:hover {
  color: var(--ink-1);
}

.dir-c .eyebrow.hat-switch .hat.is-active {
  color: var(--accent);
}

/* ─── Section card ─────────────────────────────────────────────── */

.dir-c .section {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.dir-c .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.dir-c .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.dir-c .section-title .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-3);
}

.dir-c .section-title .count {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink-3);
  font-weight: 500;
}

/* Info-icon next to the section title — rendered with a native
   `title=` tooltip on hover. Per the Report Card Anatomy in
   docs/development/ui-design.md, this is the [ⓘ info/description]
   slot in the card header. */
.dir-c .section-title .info-icon {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
  cursor: help;
}
.dir-c .section-title .info-icon:hover {
  color: var(--ink-2);
}

.dir-c .section-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dir-c .section-actions .link {
  font-size: 12px;
  color: var(--accent-ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.dir-c .section-actions .link:hover {
  text-decoration: underline;
}

/* ─── Section footer (action row at the bottom of a section) ────
   Used to anchor submit / cancel buttons (forms) or trailing
   actions on read-only sections. Top border mirrors section-head's
   bottom border for symmetry. */
.dir-c .section-foot {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

/* ─── Field list (read-only label/value pairs) ──────────────────
   Definition list inside a .section body. Used for profile pages,
   read-only summaries, anywhere a "name: value" pattern needs to
   render calmly without becoming a table. Wrap in <dl>; pair each
   <dt> with a <dd>. The <dd> is a flex row so a status pill or a
   trailing action button (.btn .btn-sm) reads as part of the value. */
.dir-c .field-list {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px 16px;
  padding: 16px 20px;
  margin: 0;
}
.dir-c .field-list dt {
  font-size: 12px;
  color: var(--ink-3);
  align-self: center;
}
.dir-c .field-list dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Form field group (label + input + helper text) ───────────
   Stacked layout. Scoped form-control styling targets the
   common WTForms-rendered inputs inside the group so the
   templates can call `{{ form.field() }}` with no class argument.
   Focus state mirrors `.tile.is-selected` for visual consistency. */
.dir-c .field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 20px;
}
.dir-c .field-group + .field-group {
  padding-top: 0;
}
.dir-c .field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
}
.dir-c .field-group select,
.dir-c .field-group input[type="text"],
.dir-c .field-group input[type="email"],
.dir-c .field-group input[type="password"],
.dir-c .field-group input[type="number"],
.dir-c .field-group textarea {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--line-2);
  background: var(--bg-elev);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  width: 100%;
  margin: 0;
}
.dir-c .field-group select:focus,
.dir-c .field-group input:focus,
.dir-c .field-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.dir-c .field-help {
  font-size: 12px;
  color: var(--ink-3);
}

/* Compact swatch styling for the native colour picker. The
   default `appearance: none` rule above blanks the swatch on
   some browsers; this re-asserts the visible swatch shape. */
.dir-c .field-group input[type="color"] {
  width: 44px;
  height: 36px;
  padding: 4px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  cursor: pointer;
  -webkit-appearance: auto;
  appearance: auto;
}

/* File input keeps native rendering (browsers diverge here);
   inherit the Direction C font and tone the colour. */
.dir-c .field-group input[type="file"] {
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  padding: 6px 0;
  background: none;
  border: none;
  width: 100%;
}

/* Compound field layout — flex row inside a .field-group, for
   "prefix + input + suffix" shapes (slug with /public/.../...)
   or "swatch + readonly text" shapes (colour pickers). */
.dir-c .field-group .field-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dir-c .field-group .field-row .field-prefix,
.dir-c .field-group .field-row .field-suffix {
  font-size: 13px;
  color: var(--ink-3);
  flex-shrink: 0;
}
.dir-c .field-group .field-row input[type="text"],
.dir-c .field-group .field-row input[type="email"],
.dir-c .field-group .field-row input[type="number"] {
  flex: 1;
}

/* Per-field validation error. WTForms-bearing templates render
   form.field.errors below the input; this is the canonical
   styling for that messaging. */
.dir-c .field-error {
  color: var(--crit);
  font-size: 12px;
  margin: 0;
}

/* ─── Infobox (inline informational note) ──────────────────────
   For "this is read-only", "data lives in UTC", "configured at
   account level" — context the user needs at the point of use,
   but not severe enough for `.status critical` or large enough
   to warrant its own `.section`. Sits inside a section body. */
.dir-c .infobox {
  margin: 0 20px 16px;
  padding: 10px 14px;
  border: 1px solid color-mix(in oklch, var(--info) 28%, var(--line));
  background: color-mix(in oklch, var(--info) 6%, var(--bg));
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.dir-c .infobox svg {
  flex-shrink: 0;
  color: var(--info);
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

/* ─── Account preview banner ────────────────────────────────────
   "See your brand colours" preview for the account-settings page.
   Gradient draws from --acc-1 / --acc-2 custom properties; the
   consuming template sets them via a nonce'd <style> block using
   the |hex_colour Jinja filter to keep the values CSS-safe. The
   fallback is the Direction C brand pair so an unbranded account
   still reads cleanly. */
.dir-c .account-preview-banner {
  border-radius: var(--radius-lg);
  padding: 4px;
  background: linear-gradient(135deg, var(--acc-1, var(--brand-1)) 0%, var(--acc-2, var(--brand-2)) 100%);
  margin-bottom: 20px;
}
.dir-c .account-preview-card {
  background: var(--bg-elev);
  padding: 24px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.dir-c .account-preview-card img {
  max-height: 60px;
  margin-bottom: 12px;
}
.dir-c .account-preview-card .name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 4px;
}
.dir-c .account-preview-card .desc {
  font-size: 13px;
  color: var(--ink-2);
  margin: 0;
}

/* ─── Activity row ─────────────────────────────────────────────── */

.dir-c .activity-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  color: inherit;
}

.dir-c .activity-row:last-child {
  border-bottom: none;
}

.dir-c .activity-row:hover {
  background: var(--bg);
}

/* Static modifier — for lists of records the user views but
   doesn't navigate to (e.g. account members where there's no
   member-detail route yet). When a navigate target lands, drop
   the modifier and the row becomes a clickable `<a>` again. */
.dir-c .activity-row.static {
  cursor: default;
}
.dir-c .activity-row.static:hover {
  background: transparent;
}

.dir-c .activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.dir-c .activity-main {
  min-width: 0;
}

.dir-c .activity-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.dir-c .activity-sub {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 2px;
}

.dir-c .chev {
  color: var(--ink-3);
}

.dir-c .i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
}

.dir-c .i-sm {
  width: 14px;
  height: 14px;
}

/* ─── Feed row (activity feed) ────────────────────────────────── */

.dir-c .feed-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  cursor: default;
  transition: background 0.12s ease;
}

.dir-c .feed-row:last-child {
  border-bottom: none;
}

.dir-c .feed-row:hover {
  background: var(--bg);
}

.dir-c .feed-row .actor-av {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.dir-c .feed-line {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
  min-width: 0;
}

.dir-c .feed-line .actor {
  font-weight: 600;
  color: var(--ink);
}

.dir-c .feed-line .verb {
  color: var(--ink-2);
}

.dir-c .feed-line .object {
  color: var(--ink);
  font-weight: 500;
}

.dir-c .feed-line .crumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 6px;
}

/* Sub-process wrapper detail — applied_outputs / intended_outputs and
   captured_form_data rendered inline under the wrapper event description.
   Lets a Mark Done outcome read as one row: "Mark Done — applied
   _status: done · reason: customer happy". */
.dir-c .feed-line .feed-detail {
  font-size: 12px;
  color: var(--ink-2);
  margin-top: 2px;
}

.dir-c .feed-line .feed-detail .kv strong {
  color: var(--ink-1);
  font-weight: 600;
}

.dir-c .feed-line .feed-detail .kv em {
  color: var(--ink-1);
  font-style: normal;
}

.dir-c .feed-line .feed-detail .sep {
  color: var(--ink-3);
}

.dir-c .feed-row.feed-row-aborted .verb {
  color: var(--warn);
}

.dir-c .feed-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  white-space: nowrap;
}

/* Empty state — "card shape preserved with a meaningful message"
   per docs/development/ui-design.md §Report Card Anatomy.
   `.card-empty` is the canonical name; `.feed-empty` is kept as
   an alias so the existing call sites keep working. */
.dir-c .card-empty,
.dir-c .feed-empty {
  padding: 30px 20px;
  text-align: center;
  color: var(--ink-3);
}

.dir-c .card-empty .t,
.dir-c .feed-empty .t {
  color: var(--ink-2);
  font-size: 13px;
}

.dir-c .card-empty .s,
.dir-c .feed-empty .s {
  font-size: 12px;
  margin-top: 4px;
}

/* ─── Attention row (needs_attention) ─────────────────────────── */

.dir-c .attn-row {
  display: grid;
  grid-template-columns: 4px auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px 14px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.12s ease;
  text-decoration: none;
  color: inherit;
}

.dir-c .attn-row:last-child {
  border-bottom: none;
}

.dir-c .attn-row:hover {
  background: var(--bg);
}

.dir-c .attn-edge {
  align-self: stretch;
  width: 4px;
  background: var(--ink-4);
}

.dir-c .attn-row.overdue .attn-edge {
  background: var(--crit);
}

.dir-c .attn-row.blocked .attn-edge {
  background: var(--crit);
}

.dir-c .attn-row.stalled .attn-edge {
  background: var(--warn);
}

.dir-c .attn-row.waiting .attn-edge {
  background: var(--info);
}

.dir-c .attn-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  color: var(--ink-3);
  background: var(--bg);
  border: 1px solid var(--line);
}

.dir-c .attn-row.overdue .attn-tag {
  color: var(--crit);
  border-color: color-mix(in oklch, var(--crit) 28%, var(--line));
  background: color-mix(in oklch, var(--crit) 6%, var(--bg));
}

.dir-c .attn-row.blocked .attn-tag {
  color: var(--crit);
  border-color: color-mix(in oklch, var(--crit) 28%, var(--line));
  background: color-mix(in oklch, var(--crit) 6%, var(--bg));
}

.dir-c .attn-row.stalled .attn-tag {
  color: var(--warn);
  border-color: color-mix(in oklch, var(--warn) 30%, var(--line));
  background: color-mix(in oklch, var(--warn) 8%, var(--bg));
}

.dir-c .attn-row.waiting .attn-tag {
  color: var(--info);
  border-color: color-mix(in oklch, var(--info) 28%, var(--line));
  background: color-mix(in oklch, var(--info) 6%, var(--bg));
}

.dir-c .attn-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dir-c .attn-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-c .attn-sub {
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dir-c .attn-sub .crumb-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}

.dir-c .age {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
  white-space: nowrap;
}

.dir-c .age.warn {
  color: var(--warn);
  border-color: color-mix(in oklch, var(--warn) 30%, var(--line));
}

.dir-c .age.crit {
  color: var(--crit);
  border-color: color-mix(in oklch, var(--crit) 30%, var(--line));
}

.dir-c .attn-positive {
  padding: 36px 20px 40px;
  text-align: center;
}

.dir-c .attn-positive .check {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: color-mix(in oklch, var(--ok) 14%, var(--bg-elev));
  color: var(--ok);
  display: inline-grid;
  place-items: center;
  margin-bottom: 12px;
}

.dir-c .attn-positive .t {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.dir-c .attn-positive .s {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 4px;
}

/* ─── Account state grid (account_state_grid) ─────────────────── */

.dir-c .ah-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.dir-c .ah-cell {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dir-c .ah-cell:nth-child(even) {
  border-right: none;
}

.dir-c .ah-cell:nth-last-child(-n + 2) {
  border-bottom: none;
}

.dir-c .ah-cell-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dir-c .ah-cell-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dir-c .ah-cell-label .icon {
  color: var(--ink-3);
  width: 14px;
  height: 14px;
}

.dir-c .ah-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.dir-c .ah-status.ok {
  color: var(--ok);
  background: color-mix(in oklch, var(--ok) 12%, var(--bg-elev));
}

.dir-c .ah-status.warn {
  color: var(--warn);
  background: color-mix(in oklch, var(--warn) 15%, var(--bg-elev));
}

.dir-c .ah-status.crit {
  color: var(--crit);
  background: color-mix(in oklch, var(--crit) 12%, var(--bg-elev));
}

.dir-c .ah-status.info {
  color: var(--info);
  background: color-mix(in oklch, var(--info) 10%, var(--bg-elev));
}

.dir-c .ah-status .sdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dir-c .ah-cell-body {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.dir-c .ah-num {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.dir-c .ah-qual {
  font-size: 12px;
  color: var(--ink-2);
}

.dir-c .ah-cell-foot {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dir-c .ah-cell-foot .ok {
  color: var(--ok);
}

.dir-c .ah-cell-foot .warn {
  color: var(--warn);
}

.dir-c .ah-cell-foot .crit {
  color: var(--crit);
}

.dir-c .ah-healthy {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: color-mix(in oklch, var(--ok) 8%, var(--bg-elev));
  border-bottom: 1px solid color-mix(in oklch, var(--ok) 18%, var(--line));
  color: var(--ok);
  font-size: 13px;
  font-weight: 500;
}

.dir-c .ah-healthy .check-pill {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--ok) 25%, var(--bg-elev));
  color: var(--ok);
  display: grid;
  place-items: center;
}

.dir-c .ah-healthy .h-text {
  color: var(--ink);
  font-weight: 500;
}

.dir-c .ah-healthy .h-sub {
  color: var(--ink-3);
  margin-left: auto;
  font-size: 12px;
}

/* ─── Utility bar (top, slim) ─────────────────────────────────────── */
.dir-c .utility-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 32px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  font-size: 13px;
  color: var(--ink-2);
}
.dir-c .utility-bar .brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.dir-c .utility-bar .brand-mark .logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.dir-c .utility-bar nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.dir-c .utility-bar nav a {
  color: var(--ink-2);
  text-decoration: none;
}
.dir-c .utility-bar nav a:hover {
  color: var(--ink);
}
.dir-c .utility-bar .right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dir-c .utility-bar .pill-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  text-decoration: none;
}
.dir-c .utility-bar .pill-switch:hover {
  color: var(--ink);
  border-color: var(--line-2);
}
.dir-c .utility-bar .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.dir-c .utility-bar .utility-link {
  color: var(--ink-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.dir-c .utility-bar .utility-link:hover {
  color: var(--ink);
}

/* ─── Accent rule — slim brand presence under utility bar ────────── */
.dir-c .accent-rule {
  height: 3px;
  background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
}

/* ─── Tile rail (quick action grid) ──────────────────────────────── */
/* Fixed-width tracks so a small number of tiles don't stretch absurdly wide.
   `auto-fill` (not `auto-fit`) leaves empty space on the right when the row
   is under-filled, instead of expanding tracks to consume it. */
.dir-c .tile-rail {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 12px;
}
.dir-c .tile {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s;
  cursor: pointer;
}
.dir-c .tile:hover {
  border-color: var(--ink-4);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.dir-c .tile-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
  border: 1px solid transparent;
}
.dir-c .tile-icon svg {
  width: 16px;
  height: 16px;
}
.dir-c .tile-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.dir-c .tile-sub {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}
/* Selected state for tile-as-picker patterns (e.g. account-type
   chooser). Accent border + soft ring; hover-translate carries over
   so a picked tile still feels interactive. */
.dir-c .tile.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.dir-c .tile.is-selected:hover {
  border-color: var(--accent);
}

/* Wider rail — for tiles that carry more than icon+title+sub
   (e.g. the account picker, which shows stats and status). */
.dir-c .tile-rail-wide {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
  gap: 16px;
}

/* Large tile icon — for account/process logos, where the icon is an
   image rather than a Lucide stroke and needs more room. */
.dir-c .tile-icon.tile-icon-lg {
  width: 48px;
  height: 48px;
  background: var(--bg);
  border-color: var(--line);
  padding: 4px;
}
.dir-c .tile-icon img,
.dir-c .activity-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

/* At-a-glance stats row, sits inside a tile above status indicators.
   Used by the account picker for "N Members · M Processes". */
.dir-c .tile-stats {
  display: flex;
  gap: 14px;
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 12px;
}
.dir-c .tile-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.dir-c .tile-stat .n {
  font-weight: 600;
  color: var(--ink);
}
.dir-c .tile-stat svg {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}

/* CTA spacing inside the empty-state block. The .btn already has
   its own padding; this is the gap between the "no items" message
   and the action button. */
.dir-c .card-empty .btn,
.dir-c .feed-empty .btn {
  margin-top: 16px;
}

/* ─── Task row (Tasks, Needs Attention shared anatomy) ─────────── */
.dir-c .task-row {
  display: grid;
  grid-template-columns: 16px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s ease;
  text-decoration: none;
  color: inherit;
}
.dir-c .task-row:last-child {
  border-bottom: none;
}
.dir-c .task-row:hover {
  background: var(--bg);
}
.dir-c .prio-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-4);
}
.dir-c .prio-dot.high {
  background: var(--crit);
}
.dir-c .prio-dot.med {
  background: var(--warn);
}
.dir-c .prio-dot.low {
  background: var(--ink-4);
}
.dir-c .task-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dir-c .task-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dir-c .task-sub {
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Subgroup header (used for group_by_process) ──────────────── */
.dir-c .subgroup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.dir-c .subgroup-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dir-c .subgroup-link {
  font-size: 12px;
  color: var(--ink-3);
  text-decoration: none;
}
.dir-c .subgroup-link:hover {
  color: var(--ink);
}

/* ─── Status indicator (semantic status palette) ───────────────
   Canonical pill for the six platform status states. See
   docs/development/ui-design.md §Semantic Status Colours for the
   meaning of each state. Use this in preference to ad-hoc
   colouring; colours carry meaning, not decoration. */
.dir-c .status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  color: var(--ink-3);
  background: var(--bg);
}
.dir-c .status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.dir-c .status.critical {
  color: var(--crit);
  background: color-mix(in oklch, var(--crit) 12%, var(--bg-elev));
}
.dir-c .status.risk {
  color: var(--risk);
  background: color-mix(in oklch, var(--risk) 12%, var(--bg-elev));
}
.dir-c .status.pending {
  color: var(--warn);
  background: color-mix(in oklch, var(--warn) 15%, var(--bg-elev));
}
.dir-c .status.ontrack {
  color: var(--ok);
  background: color-mix(in oklch, var(--ok) 12%, var(--bg-elev));
}
.dir-c .status.neutral {
  color: var(--neutral);
  background: color-mix(in oklch, var(--neutral) 10%, var(--bg-elev));
}
.dir-c .status.info {
  color: var(--info);
  background: color-mix(in oklch, var(--info) 10%, var(--bg-elev));
}

/* ─── State pill ──────────────────────────────────────────────── */
.dir-c .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.dir-c .pill.warn {
  background: oklch(0.96 0.04 75);
  color: oklch(0.40 0.10 75);
  border-color: oklch(0.85 0.08 75);
}

/* ─── Row actions group ──────────────────────────────────────── */
.dir-c .row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ─── Buttons ──────────────────────────────────────────────────
   .btn   — neutral default (Foundation .button / .button.secondary)
   .btn-primary — strong dark fill (use sparingly for authoritative actions)
   .btn-accent  — brand-accent fill for "go" actions (Foundation .button.primary)
   .btn-success / .btn-warning / .btn-alert — semantic state variants
   .btn-ghost   — transparent border (Foundation .button.hollow)
   .btn-link    — borderless text-only (Foundation .button.clear)
   .btn-sm / .btn-xs — size mods (Foundation .button.small / .button.tiny)
   .btn-block — full width (Foundation .button.expanded)
*/
.dir-c .btn {
  appearance: none;
  border: 1px solid var(--line-2);
  background: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  margin: 0;
}
.dir-c .btn:hover {
  border-color: var(--ink-4);
  background: var(--bg);
}
.dir-c .btn-primary {
  background: var(--ink);
  color: var(--bg-elev);
  border-color: var(--ink);
}
.dir-c .btn-primary:hover {
  background: var(--ink-2);
  border-color: var(--ink-2);
}
.dir-c .btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.dir-c .btn-accent:hover {
  filter: brightness(1.08);
  border-color: var(--accent);
  background: var(--accent);
}
.dir-c .btn-success {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
}
.dir-c .btn-success:hover {
  filter: brightness(1.08);
  background: var(--ok);
  border-color: var(--ok);
}
.dir-c .btn-warning {
  background: var(--warn);
  color: #1a1206;
  border-color: var(--warn);
}
.dir-c .btn-warning:hover {
  filter: brightness(1.08);
  background: var(--warn);
  border-color: var(--warn);
}
.dir-c .btn-alert {
  background: var(--crit);
  color: #fff;
  border-color: var(--crit);
}
.dir-c .btn-alert:hover {
  filter: brightness(1.08);
  background: var(--crit);
  border-color: var(--crit);
}
.dir-c .btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.dir-c .btn-ghost:hover {
  background: var(--bg-elev);
  color: var(--ink);
  border-color: var(--line);
}
.dir-c .btn-link {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  padding: 4px 6px;
}
.dir-c .btn-link:hover {
  color: var(--accent-ink);
  background: transparent;
  text-decoration: underline;
}
.dir-c .btn-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 5px;
}
.dir-c .btn-xs {
  padding: 3px 8px;
  font-size: 11px;
  border-radius: 4px;
}
.dir-c .btn-block {
  width: 100%;
  justify-content: center;
}

/* ─── Empty state for task lists ──────────────────────────────── */
.dir-c .task-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  color: var(--ink-3);
  font-size: 13px;
}
.dir-c .task-empty svg {
  width: 18px;
  height: 18px;
  color: var(--ok);
}

/* ─── Page header (eyebrow + H1 + subtitle + actions) ──────────── */
.dir-c .page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}
.dir-c .page-head .titles {
  min-width: 0;
}
.dir-c .page-head .h1 {
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 600;
}
.dir-c .page-head .subtitle {
  font-size: 14px;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0;
}
.dir-c .page-head .head-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  align-items: center;
}

/* ─── Breadcrumb (small, uppercase, letterspaced) ──────────────── */
.dir-c .crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0;
}
.dir-c .crumb .sep {
  color: var(--ink-4);
}
.dir-c .crumb a {
  color: var(--ink-3);
  text-decoration: none;
}
.dir-c .crumb a:hover {
  color: var(--ink);
}

/* API token show-once page — feedback span next to the copy button. */
.dir-c .copy-status {
  margin-left: 1em;
  color: var(--ink-2);
  font-size: 0.875rem;
}
