.minderling-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
  width: calc(100% + clamp(0rem, 12vw, 10rem));
  min-height: calc(100svh - 4rem);
  margin: -1.6rem 0 0 calc(-1 * clamp(0rem, 12vw, 10rem));
  background:
    radial-gradient(circle at 85% 8%, rgba(242, 182, 50, 0.18), transparent 24rem),
    linear-gradient(135deg, #f8f1e4 0%, #fffaf0 52%, #f6efe3 100%);
  color: #10233d;
}

.minderling-rail {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: 1.25rem;
  border-right: 1px solid rgba(16, 35, 61, 0.12);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
}

.minderling-rail__brand {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-bottom: 1.5rem;
  color: #061b34;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.9rem;
  line-height: 1.1;
}

.minderling-rail__brand span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 0.45rem;
  background: #061b34;
  color: #fffaf0;
}

.minderling-rail nav {
  display: grid;
  gap: 0.35rem;
}

.minderling-rail nav a {
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  color: #20314c;
  font-size: 0.82rem;
  font-weight: 700;
}

.minderling-rail nav a.is-active,
.minderling-rail nav a:hover {
  background: rgba(23, 92, 180, 0.11);
  color: #174f9d;
  text-decoration: none;
}

.minderling-rail__stack {
  margin-top: 2rem;
  padding: 1rem;
  border: 1px solid rgba(16, 35, 61, 0.13);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
}

.minderling-rail__stack p {
  margin: 0 0 0.8rem !important;
  color: #061b34;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.minderling-rail__stack span {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.76rem;
  font-weight: 900;
}

.minderling-rail__stack small {
  display: block;
  margin-left: 1rem;
  color: #485a70;
  font-weight: 600;
}

.minderling-app {
  box-sizing: border-box;
  width: auto;
  max-width: 95rem;
  min-width: 0;
  padding: clamp(1.2rem, 3vw, 2.2rem);
}

.minderling-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.72fr);
  gap: 2rem;
  align-items: center;
  margin-bottom: 1.6rem;
}

.minderling-kicker {
  margin: 0 0 0.65rem !important;
  color: #9a5108;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.minderling-hero h1 {
  max-width: 11ch;
  margin: 0;
  color: #061b34;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.6rem);
  line-height: 0.9;
}

.minderling-lead {
  max-width: 44rem;
  margin: 1rem 0 0 !important;
  color: #15243a;
  font-size: 1.03rem;
  line-height: 1.6 !important;
}

.minderling-flow-card,
.minderling-panel,
.minderling-card {
  border: 1px solid rgba(77, 58, 30, 0.18);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 50px rgba(26, 30, 38, 0.08);
}

.minderling-flow-card {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 1.1rem;
  border-radius: 1rem;
  text-align: center;
}

.minderling-flow-card p {
  grid-column: 1 / -1;
  margin: 0 0 0.2rem !important;
  color: #061b34;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.minderling-flow-card div {
  display: grid;
  gap: 0.15rem;
}

.minderling-flow-card i {
  color: #061b34;
  font-style: normal;
  font-size: 1.6rem;
  font-weight: 900;
}

.flow-gem {
  font-size: 2rem;
  line-height: 1;
}

.mf { color: #1159b6; }
.ms { color: #b96b04; }
.mc { color: #197c34; }

.minderling-flow-card strong {
  font-size: 0.85rem;
  font-weight: 900;
}

.minderling-flow-card b {
  color: #485a70;
  font-size: 0.72rem;
  font-style: italic;
}

.minderling-role-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
}

.minderling-card {
  position: relative;
  overflow: hidden;
  min-height: 24rem;
  padding: 0.75rem 0.75rem 1rem;
  border-radius: 1rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.minderling-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 70px rgba(26, 30, 38, 0.14);
}

.minderling-number {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  display: grid;
  width: 1.8rem;
  height: 1.8rem;
  place-items: center;
  border-radius: 999px;
  background: #061b34;
  color: white;
  font-weight: 900;
}

.minderling-portrait {
  display: grid;
  height: 12.5rem;
  place-items: center;
  margin: -0.75rem -0.75rem 0.75rem;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.56), transparent 4.5rem),
    linear-gradient(145deg, var(--role-a), var(--role-b));
}

.minderling-portrait span {
  filter: drop-shadow(0 18px 16px rgba(0,0,0,0.22));
  font-size: 5.3rem;
}

.minderling-card h2 {
  margin: 0.2rem 0 0;
  color: var(--role-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  line-height: 1.05;
}

.minderling-motto {
  min-height: 2.3rem;
  margin: 0.25rem 0 0.7rem !important;
  color: var(--role-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.82rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1.25 !important;
}

.minderling-card p:not(.minderling-motto) {
  min-height: 3.3rem;
  margin: 0.6rem 0 0.8rem !important;
  color: #22324a;
  font-size: 0.78rem;
  line-height: 1.35 !important;
}

.minderling-card a {
  display: inline-flex;
  padding: 0.42rem 0.7rem;
  border: 1px solid color-mix(in srgb, var(--role-ink) 42%, transparent);
  border-radius: 0.45rem;
  color: var(--role-ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.minderling-card--stack { --role-a: #1b6cbd; --role-b: #082f69; --role-ink: #1455a3; }
.minderling-card--forge { --role-a: #2e9e4f; --role-b: #0d552a; --role-ink: #13672d; }
.minderling-card--solve { --role-a: #e7a72d; --role-b: #9b5a07; --role-ink: #a65a00; }
.minderling-card--cert { --role-a: #7a52c7; --role-b: #3f217d; --role-ink: #503090; }
.minderling-card--lane { --role-a: #14a9b8; --role-b: #076373; --role-ink: #087486; }
.minderling-card--fixture { --role-a: #d27a22; --role-b: #843705; --role-ink: #a64c0b; }

.minderling-panels {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1.1fr;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.minderling-panel {
  min-height: 11rem;
  padding: 1.15rem;
  border-radius: 1rem;
}

.minderling-panel h2,
.minderling-deployment h2 {
  margin: 0 0 0.7rem;
  color: #061b34;
  font-family: Georgia, "Times New Roman", serif;
}

.minderling-panel p,
.minderling-panel li,
.minderling-panel ol {
  color: #24354b;
  font-size: 0.86rem;
  line-height: 1.5 !important;
}

.minderling-panel--dark {
  background: #061b34;
  color: #fffaf0;
}

.minderling-panel--dark h2,
.minderling-panel--dark p,
.minderling-panel--dark li {
  color: #fffaf0;
}

.minderling-panel--dark ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem;
  padding-left: 1rem;
}

.minderling-panel--flow p {
  margin: 0.5rem 0 !important;
}

.minderling-deployment {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.2rem;
  border: 1px solid rgba(77, 58, 30, 0.18);
  border-radius: 1rem;
  background: rgba(255,255,255,0.68);
}

.minderling-deployment p {
  color: #24354b;
}

.minderling-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.minderling-steps span {
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(6, 27, 52, 0.06);
  color: #1e3048;
  font-size: 0.78rem;
  font-weight: 700;
}

.minderling-steps b {
  color: #9a5108;
}

@media (max-width: 1180px) {
  .minderling-shell { grid-template-columns: 1fr; }
  .minderling-rail { position: relative; height: auto; }
  .minderling-rail nav { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .minderling-hero,
  .minderling-deployment { grid-template-columns: 1fr; }
  .minderling-role-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .minderling-panels { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .minderling-shell {
    width: auto;
    margin-left: 0;
  }

  .minderling-rail nav,
  .minderling-role-grid,
  .minderling-steps,
  .minderling-flow-card { grid-template-columns: 1fr; }
  .minderling-flow-card i { display: none; }
  .minderling-app { padding: 1rem; }
  .minderling-hero h1 { font-size: 3.2rem; }
}
