/* Farmer-facing producer pages — styles.
 * Kept separate from theme.css so the existing engine-facing pages don't shift.
 */

.farmer-home { padding-bottom: 12px; }
.farmer-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) { .farmer-2col { grid-template-columns: 1fr; } }

/* ───────────────────────── Farm hero ───────────────────────── */
.farm-hero {
  position: relative;
  background:
    radial-gradient(800px 400px at 110% -20%, rgba(255,191,0,0.20), transparent 60%),
    linear-gradient(135deg, #0a3567 0%, var(--aggie-blue) 60%, #02192f 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(2, 40, 81, 0.16);
}
@media (max-width: 760px) {
  .farm-hero { grid-template-columns: 1fr; padding: 22px 18px; }
}
.farm-hero-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.farm-hero-greeting {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.02em;
}
.farm-hero-title {
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0;
  color: #fff;
  text-wrap: balance;
}
@media (max-width: 560px) { .farm-hero-title { font-size: 28px; } }
.farm-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}
.farm-hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.farm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* Field diagram on the right */
.farm-fields-diagram {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.ffd-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}
.ffd-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}
.ffd-tile {
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: rgba(255,255,255,0.88);
}
.ffd-tile-name { font-size: 12px; font-weight: 600; line-height: 1.1; }
.ffd-tile-area {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-mono);
}

/* ───────────────────────── Hero journey ───────────────────────── */
.hero-journey {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px 18px;
  box-shadow: var(--shadow-sm);
}
.hero-journey-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.hero-journey-rail {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.journey-node {
  flex: 1 1 0;
  min-width: 150px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 14px;
  background: var(--bg-subtle);
  border: 1px solid transparent;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.journey-node:hover {
  background: #eef2f7;
  border-color: var(--border);
}
.journey-node-bubble {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-3);
}
.journey-node-body { min-width: 0; }
.journey-node-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  line-height: 1.25;
}
.journey-node-sub {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}
.journey-node.st-done .journey-node-bubble {
  background: var(--st-pass-bg);
  border-color: var(--st-pass);
  color: var(--st-pass);
}
.journey-node.st-active {
  background: var(--ic-navy-100);
}
.journey-node.st-active .journey-node-bubble {
  background: var(--aggie-blue);
  border-color: var(--aggie-blue);
  color: #fff;
}
.journey-node.st-alert {
  background: #fffbeb;
  border-color: #fde68a;
}
.journey-node.st-alert .journey-node-bubble {
  background: var(--aggie-gold);
  border-color: var(--aggie-gold);
  color: var(--aggie-blue);
}
.journey-node.st-todo .journey-node-bubble {
  background: #fff;
}
.hero-journey-link {
  align-self: center;
  width: 18px;
  flex-shrink: 0;
  height: 2px;
  background: var(--border-strong);
  margin-top: 4px;
}
.hero-journey-link.done { background: var(--st-pass); }
@media (max-width: 900px) {
  .hero-journey-link { display: none; }
  .journey-node { flex: 1 1 240px; }
}

/* ───────────────────────── This-week list ───────────────────────── */
.week-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.week-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.week-item:last-child { border-bottom: none; }
.week-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--text-3);
}
.week-dot.urgency-high   { background: var(--st-fail); }
.week-dot.urgency-medium { background: var(--st-pending); }
.week-dot.urgency-low    { background: var(--aggie-blue-light); }
/* The week-item itself only gets a subtle left rail per urgency */
.week-item.urgency-high   { box-shadow: inset 3px 0 0 0 var(--st-fail); }
.week-item.urgency-medium { box-shadow: inset 3px 0 0 0 var(--st-pending); }
.week-item.urgency-low    { box-shadow: inset 3px 0 0 0 var(--aggie-blue-light); }
.week-body { flex: 1 1 auto; min-width: 0; }
.week-title { font-size: 13.5px; font-weight: 600; color: var(--text-1); line-height: 1.35; }
.week-sub   { font-size: 12px; color: var(--text-3); margin-top: 2px; }

/* ───────────────────────── At-a-glance certifications ───────────────────────── */
.cert-glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
}
.cert-glance-card {
  background: #fff;
  border: none;
  text-align: left;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: inherit;
}
.cert-glance-card:hover { background: var(--bg-subtle); }
.cert-glance-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cert-glance-name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.cert-glance-status { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.cert-glance-chev { color: var(--text-3); flex-shrink: 0; }
.cert-glance-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
}
.cert-glance-sev {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.sev-swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.sev-num { font-weight: 600; color: var(--text-1); font-variant-numeric: tabular-nums; }

/* ───────────────────────── Severity ribbon ───────────────────────── */
.severity-ribbon {
  display: flex;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-subtle);
}
.sev-seg { transition: filter 120ms ease; }

.severity-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
}
.severity-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.sev-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ───────────────────────── Farm sidebar ───────────────────────── */
.farm-sidebar { padding: 4px 0 8px; }
.farm-sidebar-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.farm-sidebar-row:last-of-type { border-bottom: none; }
.farm-sidebar-icon {
  flex-shrink: 0;
  color: var(--aggie-blue);
  background: var(--ic-navy-100);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 8px;
  box-sizing: border-box;
}
.farm-sidebar-edit { margin: 8px 12px 0; }

/* ───────────────────────── Tabs (inner page) ───────────────────────── */
.tab-count {
  display: inline-grid;
  place-items: center;
  margin-left: 8px;
  min-width: 20px;
  padding: 0 6px;
  height: 18px;
  border-radius: 9px;
  background: var(--bg-subtle);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 600;
}
.tab.active .tab-count { background: var(--ic-navy-100); color: var(--aggie-blue); }
.tab-count-accent { background: var(--ic-gold-200) !important; color: #6b4f00 !important; }

/* ───────────────────────── Certification accordion ───────────────────────── */
.cert-accordion {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 120ms ease;
}
.cert-accordion.open { border-color: var(--aggie-blue-light); }
.cert-accordion-head {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
  font-family: inherit;
}
.cert-accordion-head:hover { background: var(--bg-subtle); }
.cert-accordion.open .cert-accordion-head:hover { background: transparent; }
@media (max-width: 760px) {
  .cert-accordion-head { grid-template-columns: 1fr; gap: 12px; }
}
.cert-accordion-titles { min-width: 0; }
.cert-accordion-name { font-size: 16px; font-weight: 600; color: var(--text-1); }
.cert-accordion-sub  { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.cert-accordion-meta { min-width: 0; }

.cert-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.cert-status-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.cert-status-pill.st-review { background: var(--st-pending-bg); color: var(--st-pending); }
.cert-status-pill.st-draft  { background: var(--bg-subtle);     color: var(--text-3); }
.cert-status-pill.st-pass   { background: var(--st-pass-bg);    color: var(--st-pass); }

.cert-accordion-body {
  padding: 0 20px 18px;
  border-top: 1px solid var(--border);
}
.cert-next-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  padding: 14px 16px;
  background: #fffaeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
}
.cert-next-step.urgency-high   { background: #fef2f2; border-color: #fecaca; }
.cert-next-step.urgency-medium { background: #fffaeb; border-color: #fde68a; }
.cert-next-step.urgency-low    { background: var(--st-info-bg); border-color: #bfd1ed; }
.cert-next-step .week-dot { margin-right: 0; }

.cert-reqs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.req-group { }
.req-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.req-group-count { font-size: 12px; color: var(--text-3); }

.req-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.req-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.req-row:last-child { border-bottom: none; }
.req-row:hover { background: var(--bg-subtle); }
.req-status-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  color: var(--text-3);
}
.req-status-icon.st-pass    { background: var(--st-pass-bg);    color: var(--st-pass);    border-color: var(--st-pass); }
.req-status-icon.st-pending { background: var(--st-pending-bg); color: var(--st-pending); border-color: var(--st-pending); }
.req-status-icon.st-fail    { background: var(--st-fail-bg);    color: var(--st-fail);    border-color: var(--st-fail); }
.req-status-icon.st-na      { background: var(--st-na-bg);      color: var(--st-na); }
.req-status-icon.st-draft   { background: var(--bg-subtle);     color: var(--text-3); }
.req-status-icon .dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; }

.req-row-body { flex: 1 1 auto; min-width: 0; }
.req-row-title { font-size: 13.5px; color: var(--text-1); line-height: 1.35; }
.req-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.chip-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  background: var(--bg-subtle);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.chip-fuzzy {
  background: var(--ic-gold-200);
  color: #6b4f00;
  border-color: rgba(255, 191, 0, 0.35);
}
.req-row-link {
  background: transparent;
  border: none;
  font-size: 12px;
  font-weight: 500;
  color: var(--aggie-blue);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.req-row-link:hover { background: var(--ic-navy-100); }

.cert-accordion-footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-top: 18px;
}

/* ───────────────────────── Discover cards ───────────────────────── */
.discover-spark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ic-gold-200);
  color: #6b4f00;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.discover-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.discover-card:hover {
  border-color: var(--aggie-blue-light);
  box-shadow: 0 6px 16px rgba(2, 40, 81, 0.08);
}
.discover-card-head { display: flex; flex-direction: column; gap: 4px; }
.discover-card-body-stamp {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.discover-card-name { font-size: 17px; font-weight: 700; color: var(--text-1); line-height: 1.2; }
.discover-card-blurb { font-size: 12.5px; color: var(--text-3); }

.discover-pct {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-radius: 10px;
}
.discover-pct-ring { flex-shrink: 0; }
.discover-pct-text { min-width: 0; }
.discover-pct-big { font-size: 24px; font-weight: 700; color: var(--aggie-blue); line-height: 1; }
.discover-pct-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.discover-card-why {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.5;
}
.discover-card-matched, .discover-card-missing {
  font-size: 12px;
}
.discover-missing-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}
.discover-missing-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  color: var(--text-2);
  font-size: 12.5px;
}
.discover-missing-list li svg { color: var(--text-3); }

.discover-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px dashed var(--border);
}

/* ───────────────────────── Records ───────────────────────── */
.seg-tabs {
  display: inline-flex;
  background: var(--bg-subtle);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border);
}
.seg-tab {
  background: transparent;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
}
.seg-tab.active {
  background: #fff;
  color: var(--text-1);
  box-shadow: var(--shadow-sm);
}

.records-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
}
.record-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 120ms ease;
}
.record-card:hover { border-color: var(--border-strong); }
.record-card-head { display: flex; align-items: flex-start; gap: 12px; }
.record-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.record-icon.leaf { background: var(--role-producer-bg); color: var(--role-producer); }
.record-icon.doc  { background: var(--ic-navy-100); color: var(--aggie-blue); }
.record-card-type {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
}
.record-card-title { font-size: 14px; font-weight: 600; color: var(--text-1); line-height: 1.3; margin-top: 1px; }
.record-card-blurb { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }

.record-practice-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: var(--role-producer-bg);
  color: var(--role-producer);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}
.record-practice-strip .muted { color: rgba(10, 107, 91, 0.7); }

.record-card-foot {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.record-cert-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--ic-navy-100);
  color: var(--aggie-blue);
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ───────────────────────── Layout toggle (cards/list) ───────────────────────── */
.layout-toggle {
  display: inline-flex;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
}
.layout-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
}
.layout-toggle-btn.active {
  background: #fff;
  color: var(--aggie-blue);
  box-shadow: var(--shadow-sm);
}

/* ───────────────────────── Records list (accordion table) ───────────────────────── */
.records-list {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.records-list-head,
.records-list-summary {
  display: grid;
  grid-template-columns: minmax(240px, 2.4fr) minmax(120px, 1fr) minmax(120px, 1fr) 110px 28px;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  width: 100%;
}
.records-list-head {
  background: var(--bg-subtle);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.records-list-summary {
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
}
.records-list-summary:hover { background: var(--bg-subtle); }
.records-list-row:last-child .records-list-summary { border-bottom: none; }
.records-list-row.open > .records-list-summary {
  background: var(--ic-navy-100);
  border-bottom-color: transparent;
}
.rl-cell { min-width: 0; }
.rl-cell-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.rl-cell-title > div:last-child > div:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rl-cell-title > div:last-child > div:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rl-cell-chev { color: var(--text-3); justify-self: end; }

.records-list-detail {
  padding: 14px 18px 18px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfd;
}
.records-list-row.open + .records-list-row > .records-list-summary,
.records-list-row.open .records-list-detail + * { border-top: 1px solid var(--border); }
.records-list-row:last-child .records-list-detail { border-bottom: none; }

.rld-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 24px;
}
@media (max-width: 760px) { .rld-grid { grid-template-columns: 1fr; } }
.rld-section-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.rld-kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 5px 12px;
  font-size: 12.5px;
  margin: 0;
}
.rld-kv dt { color: var(--text-3); }
.rld-kv dd { margin: 0; color: var(--text-1); }

.rld-coverage {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rld-coverage li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12.5px;
}
.rld-kind-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
.rld-kind-badge.satisfies { background: var(--st-pass-bg); color: var(--st-pass); }
.rld-kind-badge.supports  { background: var(--st-info-bg); color: var(--st-info); }

.rld-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

@media (max-width: 760px) {
  .records-list-head { display: none; }
  .records-list-summary {
    grid-template-columns: 1fr 28px;
    grid-template-areas:
      "title chev"
      "type chev"
      "counts chev"
      "date chev";
    gap: 6px;
  }
  .rl-cell-title  { grid-area: title; }
  .rl-cell-type   { grid-area: type; }
  .rl-cell-counts { grid-area: counts; }
  .rl-cell-date   { grid-area: date; }
  .rl-cell-chev   { grid-area: chev; align-self: start; }
}

/* ───────────────────────── Sharing ───────────────────────── */
.sharing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}
.share-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.share-card-head { display: flex; align-items: center; gap: 12px; }
.share-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.share-card-scope {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-2);
}
.share-card-activity {  }
.share-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.share-activity-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12.5px;
}
.share-act-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--aggie-blue-light);
  flex-shrink: 0;
}
.share-act-text { flex: 1 1 auto; color: var(--text-2); }
.share-card-foot {
  display: flex;
  gap: 6px;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  justify-content: flex-end;
}

.invite-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fffbeb;
  border: 1px dashed #fde68a;
  border-radius: 8px;
}
.invite-who { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }

.sharing-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.sharing-tier {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sharing-tier-tag {
  align-self: flex-start;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
}

/* ───────────────────────── Held certifications ───────────────────────── */
.held-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 14px;
}
.held-card {
  display: flex;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.held-card-bar {
  width: 5px;
  flex-shrink: 0;
}
.held-card-body {
  flex: 1 1 auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.held-card-head { display: flex; align-items: flex-start; gap: 12px; }
.held-card-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: #fff;
  display: grid;
  place-items: center;
}
.held-card-body-stamp {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.held-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1.2;
  margin-top: 2px;
}
.held-badge {
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.held-badge.active  { background: var(--st-pass-bg);    color: var(--st-pass); }
.held-badge.renewal { background: var(--st-pending-bg); color: var(--st-pending); }
.held-kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 14px;
  font-size: 12.5px;
  margin: 0;
}
.held-kv dt { color: var(--text-3); }
.held-kv dd { margin: 0; color: var(--text-1); }
.held-kv dd .expiring { color: var(--st-pending); font-weight: 600; }
.held-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

/* ───────────────────────── Requirement drawer ───────────────────────── */
.req-row { cursor: pointer; }
.req-row:focus-visible { outline: 2px solid var(--aggie-blue-light); outline-offset: -2px; }
.req-row-chev { color: var(--text-3); flex-shrink: 0; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 40, 81, 0.40);
  backdrop-filter: blur(2px);
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  animation: fade-in 140ms ease;
}
.drawer {
  width: min(560px, 100vw);
  height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 40px rgba(2, 40, 81, 0.20);
  animation: slide-in 200ms ease;
}
@keyframes slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);     opacity: 1; }
}
.drawer-head {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}
.drawer-head-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.drawer-close { flex-shrink: 0; }
.drawer-body {
  padding: 18px 22px 80px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.drawer-title {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-1);
}
.drawer-summary {
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0 0 12px;
}
.drawer-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg-subtle);
  padding: 6px 10px;
  border-radius: 6px;
  margin-bottom: 18px;
}
.drawer-source em { font-style: normal; color: var(--text-2); }

.drawer-rationale {
  background: #fffdf3;
  border: 1px solid var(--ic-gold-200);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}
.drawer-rationale p {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
  margin: 0;
}

.drawer-section-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 10px;
}
.drawer-rationale .drawer-section-head {
  margin-bottom: 6px;
  color: #6b4f00;
}

.drawer-checks {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}
.drawer-check {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.drawer-check:last-child { border-bottom: none; }
.drawer-check-body { flex: 1 1 auto; min-width: 0; }
.drawer-check-title {
  font-size: 13px;
  color: var(--text-1);
  line-height: 1.4;
}
.drawer-check-rationale {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
  line-height: 1.5;
}

.drawer-evidence {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.drawer-evidence-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.drawer-evidence-item:last-child { border-bottom: none; }

.drawer-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: #fff;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .drawer { width: 100vw; }
}
