.role-dashboard-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.5rem auto 3rem;
}

.role-dashboard-hero,
.role-metric,
.role-card,
.role-list-item,
.role-benefit {
  border: 1px solid rgba(15, 47, 43, 0.1);
  border-radius: 1.5rem;
  background: rgba(255, 253, 249, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.role-dashboard-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  padding: 1.4rem;
  margin-bottom: 1rem;
}

.role-dashboard-hero h1,
.role-card h2,
.role-scorecard strong,
.role-list-title {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
}

.role-dashboard-hero h1 {
  max-width: 13ch;
  font-size: clamp(2.45rem, 5vw, 4.4rem);
  line-height: 0.95;
}

.role-dashboard-hero p,
.role-scorecard p,
.role-list-item p,
.role-metric span,
.role-driver-intro,
.role-driver-note,
.role-benefit span {
  color: var(--ink-soft);
  line-height: 1.65;
}

.role-scorecard {
  display: grid;
  align-content: center;
  padding: 1.25rem;
  border-radius: 1.3rem;
  color: var(--white);
  background: rgba(17, 36, 33, 0.92);
}

.role-scorecard span {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 253, 249, 0.72);
}

.role-scorecard strong {
  margin: 0.4rem 0;
  font-size: 4rem;
}

.role-scorecard p {
  color: rgba(255, 253, 249, 0.78);
}

.role-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.3rem;
}

.role-actions .primary-button {
  text-decoration: none;
}

.role-secondary-link {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid rgba(234, 106, 44, 0.35);
}

.role-metrics,
.role-grid,
.role-lower-grid,
.role-list,
.role-benefits {
  display: grid;
  gap: 1rem;
}

.role-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.role-metric,
.role-card,
.role-list-item,
.role-benefit {
  padding: 1.2rem;
}

.metric-label {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.metric-value {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.role-grid {
  grid-template-columns: 0.9fr 1.1fr;
}

.role-lower-grid {
  grid-template-columns: 1.05fr 0.95fr;
  margin-top: 1rem;
}

.role-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.role-kicker {
  color: var(--accent-strong);
}

.role-form {
  display: grid;
  gap: 1rem;
}

.role-form label {
  display: grid;
  gap: 0.45rem;
  font-weight: 700;
}

.role-form input,
.role-form select,
.role-form textarea,
.role-select {
  width: 100%;
  border: 1px solid rgba(15, 47, 43, 0.12);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.role-select {
  width: auto;
  min-width: 12rem;
  padding: 0.7rem 0.9rem;
  font-weight: 700;
}

.role-list-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #126157;
  background: #dff7f3;
}

.role-pill.is-limited {
  color: #9b6500;
  background: #ffe9bf;
}

.role-pill.is-offline {
  color: #496174;
  background: #e8ecf2;
}

.role-item-grid,
.role-split-grid {
  display: grid;
  gap: 0.75rem;
}

.role-item-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.role-item-grid div,
.role-split-box {
  padding: 0.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.76);
}

.role-item-grid strong,
.role-split-box strong,
.role-benefit strong {
  display: block;
  font-family: "Space Grotesk", sans-serif;
}

.role-split-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.role-split-box strong {
  margin-bottom: 0.35rem;
  font-size: 1.45rem;
}

.role-highlight-box {
  padding: 1rem;
  border-radius: 1.2rem;
  color: var(--white);
  background: linear-gradient(135deg, rgba(17, 36, 33, 0.96), rgba(15, 47, 43, 0.84));
}

.role-highlight-box strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
}

.role-driver-summary-grid {
  margin-bottom: 1rem;
}

.role-chip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.role-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-strong);
  background: rgba(234, 106, 44, 0.14);
}

.role-driver-note {
  margin: 0.85rem 0 0;
}

.role-benefit {
  box-shadow: none;
}

.role-benefit strong {
  margin-bottom: 0.35rem;
}

.form-message.is-success {
  color: #126157;
}

.form-message.is-error {
  color: #b93620;
}

.batch-analysis {
  margin-bottom: 1rem;
}

.analysis-intro {
  max-width: 72ch;
  color: var(--ink-soft);
  line-height: 1.65;
}

.analysis-input-grid,
.analysis-summary-grid,
.analysis-result-grid {
  display: grid;
  gap: 0.75rem;
}

.analysis-input-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.analysis-input-grid label {
  display: grid;
  gap: 0.4rem;
  font-weight: 700;
}

.analysis-input {
  width: 100%;
  border: 1px solid rgba(15, 47, 43, 0.16);
  border-radius: 0.9rem;
  padding: 0.75rem 0.8rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.analysis-input.is-manual,
.analysis-table input.is-manual,
.analysis-percent-input.is-manual {
  background: #fff400;
}

.analysis-summary-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 1rem;
}

.analysis-summary-grid article,
.analysis-result-grid article {
  padding: 0.9rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.76);
}

.analysis-summary-grid span,
.analysis-result-grid span,
.analysis-percent-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
}

.analysis-percent-label {
  font-weight: 700;
}

.analysis-percent-input {
  width: 5.5rem;
  margin-left: 0.35rem;
  border: 1px solid rgba(15, 47, 43, 0.16);
  border-radius: 0.55rem;
  padding: 0.35rem 0.45rem;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
}

.analysis-summary-grid strong,
.analysis-result-grid strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
}

.analysis-emphasis {
  color: var(--white);
  background: rgba(17, 36, 33, 0.92) !important;
}

.analysis-emphasis span {
  color: rgba(255, 253, 249, 0.78);
}

.analysis-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid rgba(15, 47, 43, 0.1);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.58);
}

.analysis-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.analysis-table th,
.analysis-table td {
  padding: 0.7rem;
  border-bottom: 1px solid rgba(15, 47, 43, 0.08);
  text-align: right;
  white-space: nowrap;
}

.analysis-table th:first-child,
.analysis-table td:first-child {
  text-align: left;
  font-weight: 700;
}

.analysis-table th {
  color: var(--ink-soft);
  background: rgba(15, 47, 43, 0.05);
}

.analysis-table input {
  width: 6rem;
  border: 1px solid rgba(15, 47, 43, 0.16);
  border-radius: 0.6rem;
  padding: 0.45rem;
  font: inherit;
  text-align: right;
}

.analysis-negative {
  color: #b93620;
}

.analysis-result-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .role-dashboard-hero,
  .role-metrics,
  .role-grid,
  .role-lower-grid,
  .role-item-grid,
  .role-split-grid,
  .analysis-input-grid,
  .analysis-summary-grid,
  .analysis-result-grid {
    grid-template-columns: 1fr;
  }

  .role-section-head {
    flex-direction: column;
  }

  .role-select {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .role-dashboard-shell {
    width: min(100% - 1rem, 100%);
  }
}
