/* =========================
   CASE STUDY LAYOUT & TYPE
   ========================= */

.case-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.case-main h1,
.case-main h2,
.case-main h3,
.case-main h4 {
  line-height: 1.25;
}

.case-main h2 {
  font-size: 1.6rem;
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
}

.case-main h3 {
  font-size: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.case-main p {
  margin: 0.25rem 0 0.75rem;
}

.case-main ul {
  padding-left: 1.25rem;
  margin: 0.25rem 0 1rem;
}

.case-main hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 2.5rem 0;
}

/* Eyebrow + subtitle */
.case-main .eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.case-main .subtitle,
.case-main .case-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1rem; /* tightened */
}

/* =========================
   TL;DR ROW
   ========================= */

.tldr-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2.25rem;
}

.tldr-card {
  border-radius: 0.9rem;
  border: 1px solid var(--border-subtle);
  padding: 1rem 1.1rem 1.1rem;
  background: var(--bg-alt);
}

.tldr-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin: 0 0 0.3rem;
}

.tldr-title {
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.tldr-body {
  font-size: 0.9rem;
  margin: 0;
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .tldr-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Images */

/* Final hero spacing */
.case-main .hero-image {
  margin: 0.5rem 0 1rem;
  text-align: center;
}

/* Image blocks used later in the page */
.case-main .image-block {
  margin: 1.75rem 0;
  text-align: center;
}

.case-main .hero-image img,
.case-main .image-block img {
  max-width: 100%;
  border-radius: 12px;
}

.case-main .image-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Pills */
.case-main .pill {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--bg-alt);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-right: 0.4rem;
  margin-bottom: 0.4rem;
}

/* Two-column layout */
.case-main .two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

/* Outcome blocks (legacy, still OK to keep) */
.case-main .outcome-block {
  border-left: 3px solid var(--border-subtle);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.case-main .outcome-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.case-main .outcome-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

/* Slightly tighter space before Overview */
#overview-heading {
  margin-top: 1.5rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .case-main {
    padding: 2rem 1.25rem 3rem;
  }

  .case-main h1 {
    font-size: 1.9rem;
  }

  .case-main .two-column {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* =========================
   OVERVIEW – TILE GRID
   ========================= */

.overview-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}

.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  min-height: 400px;
}

@media (min-width: 768px) {
  .tile-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tile-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  height: 100%;
  box-sizing: border-box;
  background-color: var(--bg);
}

/* Tile themes */

/* “Light” theme – soft neutral card */
.tile-card.theme-light {
  background-color: var(--bg-alt);
  border: 1px solid var(--border-subtle);
}

/* “White” theme – more elevated card */
.tile-card.theme-white {
  background-color: var(--bg);
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}

.tile-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 24px;
}

.tile-card.theme-light .tile-icon-box {
  background-color: var(--accent-soft);
  color: var(--accent);
}

.tile-label {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.tile-card.theme-light .tile-label {
  color: var(--text-muted);
}

.tile-title {
  font-size: 30px;
  font-weight: 600;
  margin: 8px 0 0 0;
  line-height: 1.2;
}

.tile-card.theme-light .tile-title {
  color: var(--text);
}

.tile-description {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
}

.tile-card.theme-light .tile-description {
  color: var(--text-muted);
}

.highlight-text {
  color: var(--link);
  font-weight: 600;
}

.tile-card.theme-white .tile-icon-box {
  background-color: #f3e8ff;
  color: #9333ea;
}

.tile-card.theme-white .tile-label {
  color: var(--text-muted);
}

.tile-card.theme-white .tile-title {
  color: var(--text);
}

.tile-card.theme-white .tile-description {
  color: var(--text-muted);
}

/* Badges */
.tile-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tile-badge {
  background-color: #f3e8ff;
  color: #7e22ce;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

/* “Dark” tile – intentionally dark even in light theme */
.tile-card.theme-dark {
  background-color: #0f172a;
  border-color: #1e293b;
  color: #ffffff;
}

.tile-card.theme-dark .tile-icon-box {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.tile-card.theme-dark .tile-label {
  color: #94a3b8;
}

/* Muted/positive labels + highlight for dark stat tile */
.tile-card.theme-dark .tile-label--muted,
.tile-card.theme-dark .stat-label--muted {
  color: #94a3b8;
}

.tile-card.theme-dark .stat-label--positive {
  color: #34d399;
}

.tile-card.theme-dark .stat-footer-highlight {
  color: #ffffff;
  font-weight: 600;
}

.tile-card.theme-dark .tile-title {
  color: #ffffff;
}

/* Stat comparison */
.stat-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.stat-group {
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
}

.stat-value.old {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-color: #ef4444;
  text-decoration-thickness: 2px;
}

.stat-value.new {
  font-size: 32px;
  color: #ffffff;
}

.stat-arrow {
  color: #64748b;
  font-size: 24px;
}

.stat-footer {
  font-size: 14px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
  margin-top: 16px;
}

/* =========================
   RESEARCH – PERSONAS & NOTES
   ========================= */

.pi-wrapper {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 2rem 0;
  box-sizing: border-box;
  min-height: auto;
  display: block;
}

.pi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  height: 100%;
}

@media (min-width: 1024px) {
  .pi-grid {
    grid-template-columns: 4fr 8fr;
  }
}

/* Persona cards */
.pi-personas-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
  justify-content: center;
}

.pi-card {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.pi-card:hover {
  box-shadow: var(--shadow-soft);
}

/* Left color strips */
.pi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
}

.pi-card.owner::before { background-color: #2563eb; }
.pi-card.coach::before { background-color: #10b981; }
.pi-card.athlete::before { background-color: #f97316; }

.pi-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.pi-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pi-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pi-card.owner .pi-icon-box { background-color: #dbeafe; color: #2563eb; }
.pi-card.coach .pi-icon-box { background-color: #d1fae5; color: #059669; }
.pi-card.athlete .pi-icon-box { background-color: #ffedd5; color: #ea580c; }

.pi-name-group h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.pi-name-group p {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 2px 0 0 0;
}

.pi-quote {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.pi-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pi-tag {
  font-size: 10px;
  font-weight: 600;
  background-color: var(--bg-alt);
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
}

/* Insight board */
.pi-board {
  background-color: var(--bg-alt);
  border-radius: 24px;
  border: 4px dashed var(--border-subtle);
  padding: 32px;
  position: relative;
}

/* Label with bg in both modes */
.pi-board-label {
  position: absolute;
  top: -20px;
  left: 40px;
  background-color: var(--accent);
  color: var(--bg);
  padding: 8px 24px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: rotate(-2deg);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.pi-notes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .pi-notes-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.pi-col-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 8px;
  margin: 0 0 24px 0;
}

/* Sticky notes */
.pi-note {
  padding: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-bottom: 24px;
  transition: transform 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pi-note:hover {
  transform: rotate(0deg) !important;
}

/* Note colors */
.note-yellow { background-color: #fef9c3; }
.note-yellow .pi-note-icon { color: #a16207; }

.note-pink { background-color: #fce7f3; }
.note-pink .pi-note-icon { color: #be185d; }

.note-blue { background-color: #dbeafe; }
.note-blue .pi-note-icon { color: #1d4ed8; }

.note-green { background-color: #dcfce7; }
.note-green .pi-note-icon { color: #15803d; }

/* Rotations */
.rotate-n1 { transform: rotate(-1deg); }
.rotate-p1 { transform: rotate(1deg); }
.rotate-n2 { transform: rotate(-2deg); }
.rotate-p2 { transform: rotate(2deg); }

.pi-note-content h5 {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 4px 0;
}

.pi-note-content p {
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
  margin: 0;
}

/* =========================
   MY ROLE – TIMELINE & GRID
   ========================= */

.timeline-wrapper {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px;
  background-color: var(--bg);
  min-height: 800px;
  box-sizing: border-box;
}

.timeline-vis {
  position: relative;
  margin-bottom: 96px;
  padding: 0 20px;
}

/* Flow line animation */
@keyframes flowRight {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.flow-line-container {
  display: none;
  position: absolute;
  top: 32px;
  left: 0;
  right: 0;
  padding: 0 40px;
  z-index: 0;
  height: 4px;
}

@media (min-width: 768px) {
  .flow-line-container {
    display: block;
  }
}

.flow-line {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #e2e8f0 0%, #3b82f6 50%, #e2e8f0 100%);
  background-size: 200% 100%;
  animation: flowRight 2s linear infinite;
}

/* Phases */
.timeline-phases {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  position: relative;
  z-index: 10;
}

@media (min-width: 768px) {
  .timeline-phases {
    grid-template-columns: repeat(5, 1fr);
  }
}

.timeline-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.phase-icon-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--bg);
  border: 4px solid var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: all 0.3s ease;
  color: var(--text-muted);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.timeline-phase:hover .phase-icon-box {
  border-color: #dbeafe;
  transform: scale(1.1);
  color: #2563eb;
}

.phase-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px 0;
}

.phase-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  align-items: center;
}

/* Ovals / chips */
.phase-item {
  font-size: 12px;
  color: var(--text-muted);
  background-color: var(--bg-alt);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  display: inline-block;
}

/* Role breakdown grid */
.role-breakdown {
  background-color: var(--bg-alt);
  border-radius: 24px;
  padding: 40px;
  border: 1px solid var(--border-subtle);
  position: relative;
  z-index: 10;
}

.role-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}

@media (min-width: 768px) {
  .role-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.role-column {
  position: relative;
}

/* Vertical dividers on desktop */
@media (min-width: 768px) {
  .role-column.middle::before,
  .role-column.middle::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--border-subtle);
  }

  .role-column.middle::before {
    left: -24px;
  }

  .role-column.middle::after {
    right: -24px;
  }
}

.role-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.role-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-indigo { background-color: #e0e7ff; color: #4f46e5; }
.icon-blue   { background-color: #dbeafe; color: #2563eb; }
.icon-emerald { background-color: #d1fae5; color: #059669; }

.role-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.role-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.role-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.check-icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}

.check-indigo { color: #6366f1; }
.check-blue   { color: #3b82f6; }
.check-emerald { color: #10b981; }

.role-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =====================================
   EXECUTION PHASE TRACK
   ===================================== */

.execution-track {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

/* 3-column layout on larger screens */
@media (min-width: 900px) {
  .execution-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.execution-phase-card {
  position: relative;
  padding: 1.5rem 1.5rem 1.75rem;
  border-radius: 1rem;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.35));
  background: var(--bg-alt);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.25),
    0 0 0 1px rgba(15, 23, 42, 0.3);
  overflow: hidden;
}

/* Slight gradient sheen */
.execution-phase-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left,
    rgba(148, 163, 184, 0.18),
    transparent 55%);
  opacity: 0.8;
  pointer-events: none;
}

/* Inner content above gradient */
.execution-phase-card > * {
  position: relative;
  z-index: 1;
}

.execution-phase-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.execution-phase-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.execution-phase-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.7rem;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(129, 140, 248, 0.12);
  color: var(--accent-text, #e5e7eb);
  border: 1px solid rgba(129, 140, 248, 0.5);
}

.execution-phase-tag {
  color: var(--muted, #9ca3af);
}

.execution-phase-title {
  font-size: 1.15rem;
  line-height: 1.3;
  margin: 0;
}

.execution-phase-body p {
  margin: 0.35rem 0 0.75rem;
}

.execution-phase-list {
  margin: 0 0 0.75rem;
  padding-left: 1.1rem;
  font-size: 0.95rem;
}

.execution-phase-list li {
  margin-bottom: 0.35rem;
}

.execution-phase-outcome {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted, #9ca3af);
}

/* Subtle phase-specific accents */
.execution-phase-card.phase-1 {
  border-top: 3px solid rgba(129, 140, 248, 0.9); /* indigo */
}

.execution-phase-card.phase-2 {
  border-top: 3px solid rgba(56, 189, 248, 0.9);  /* cyan/blue */
}

.execution-phase-card.phase-3 {
  border-top: 3px solid rgba(52, 211, 153, 0.9);  /* emerald/green */
}

/* Light theme adjustments (if you're using data-theme) */
[data-theme="light"] .execution-phase-card {
  background: #ffffff;
  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.08),
    0 0 0 1px rgba(148, 163, 184, 0.25);
}

[data-theme="light"] .execution-phase-card::before {
  background: radial-gradient(circle at top left,
    rgba(191, 219, 254, 0.45),
    transparent 55%);
}

[data-theme="light"] .execution-phase-pill {
  background: rgba(129, 140, 248, 0.1);
  color: #1f2933;
}

/* Stack cards a bit tighter on very small screens */
@media (max-width: 599px) {
  .execution-phase-card {
    padding: 1.25rem 1.25rem 1.5rem;
  }
}

/* =====================================
   OUTCOMES – CARD GRID
   ===================================== */

.outcomes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .outcomes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.outcome-card {
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-alt);
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Header: simple eyebrow + title, no pill */
.outcome-card-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* Eyebrow label (Outcome 1, Outcome 2, etc.) */
.outcome-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0;              /* remove pill padding */
  background: none;        /* no background block */
  border-radius: 0;        /* no rounded chip */
}

.outcome-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.outcome-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* =====================================
   DESIGN DECISIONS & UI EVOLUTION
   ===================================== */

/* Intro (constraints + principles) */
.design-decisions-intro {
  margin-top: 1.5rem;
  gap: 2rem;
  align-items: flex-start;
}

.design-decisions-intro h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.design-decisions-intro ul {
  margin-top: 0.25rem;
}

/* Stack of decision cards (single column) */
.design-decisions-stack {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-top: 2rem;
}

/* Individual decision card */
.design-decision-card {
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-alt);
  padding: 1.5rem 1.75rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Image container */
.design-decision-figure {
  margin: 0 0 1rem 0;
}

.design-decision-figure img {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 0.75rem;
}

/* Text styles inside cards */
.design-decision-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  color: var(--text-muted);
  margin: 0;
}

.design-decision-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0.2rem 0 0.35rem;
  color: var(--text);
}

.design-decision-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* Mobile spacing tweaks */
@media (max-width: 768px) {
  .design-decision-card {
    padding: 1.25rem 1.25rem 1.5rem;
  }
}

/* =========================
   BACK TO TOP BUTTON
   ========================= */

#backToTop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 0.55rem 0.9rem;

  background-color: var(--surface-card);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 999px;

  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;

  opacity: 0;
  visibility: hidden;
  box-shadow: var(--shadow-soft);
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease,
    box-shadow 0.2s ease;
  z-index: 9999;
}

/* Visible state (JS toggles this) */
#backToTop.show {
  opacity: 1;
  visibility: visible;
}

/* Hover state – respects light/dark */
#backToTop:hover {
  background-color: var(--accent-soft);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.25);
}

/* Slightly adjust shadow in dark mode */
[data-theme="dark"] #backToTop {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}



