/* Writeup Checklists - master-detail explorer (checklist-hub inspired) */

.sc-wcl-main {
  --wcl-accent: #6d7bff;
  --wcl-accent-2: #a855f7;
  --wcl-fav: #fbbf24;
  --wcl-read: #4ade80;
  --wcl-radius: 16px;
  overflow: hidden;
  padding-bottom: 72px;
}

.sc-wcl-main h1,
.sc-wcl-main h2,
.sc-wcl-main h3,
.sc-wcl-main h4 {
  font-family: "Poppins", sans-serif;
}

.sc-wcl-section {
  padding-top: 28px !important;
}

.sc-wcl-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 32px;
}

.sc-wcl-stats > div {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--border, #272b36);
  border-radius: var(--wcl-radius);
  background:
    radial-gradient(120px 80px at 0% 0%, rgba(109, 123, 255, 0.12), transparent 70%),
    rgba(21, 23, 31, 0.82);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sc-wcl-stats > div:hover {
  border-color: rgba(109, 123, 255, 0.45);
  transform: translateY(-2px);
}

.sc-wcl-stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(109, 123, 255, 0.14);
  color: #9aa6ff;
  font-size: 1.05rem;
  box-shadow: 0 0 18px rgba(109, 123, 255, 0.18);
}

.sc-wcl-stats p {
  margin: 0;
}

.sc-wcl-stats strong {
  display: block;
  color: var(--heading, #fff);
  font-family: "Poppins", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sc-wcl-stats span {
  color: var(--muted, #78838f);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sc-wcl-section-heading {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}

.sc-wcl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(109, 123, 255, 0.35);
  background: rgba(109, 123, 255, 0.08);
  color: #c8ceff;
  font: 600 0.72rem/1.4 "Poppins", sans-serif;
  letter-spacing: 0.14em;
}

.sc-wcl-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wcl-accent);
  box-shadow: 0 0 10px rgba(109, 123, 255, 0.55);
}

.sc-wcl-section-heading h2 {
  margin: 0 0 8px;
  color: var(--heading, #fff);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sc-wcl-section-heading p {
  margin: 0;
  max-width: 640px;
  color: var(--muted, #78838f);
  font-size: 0.98rem;
  line-height: 1.55;
}

.sc-wcl-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.sc-wcl-main .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1px solid var(--border, #272b36);
  background: rgba(21, 23, 31, 0.9);
  color: var(--text, #c6ccd8) !important;
  font-family: "Poppins", sans-serif;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none !important;
  border-bottom: 1px solid var(--border, #272b36) !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.sc-wcl-main .btn:hover {
  border-color: var(--wcl-accent) !important;
  color: var(--heading, #fff) !important;
  transform: translateY(-1px);
}

.sc-wcl-main .btn.primary {
  background: linear-gradient(120deg, #6d7bff 0%, #8b5cf6 55%, #a855f7 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: 0 8px 22px rgba(109, 123, 255, 0.28) !important;
}

.sc-wcl-main .btn.primary:hover {
  filter: brightness(1.06);
  color: #fff !important;
}

.sc-wcl-main .btn.sc-wcl-btn-ghost {
  background: transparent !important;
  border-color: rgba(109, 123, 255, 0.45) !important;
  color: #c4cbff !important;
}

.sc-wcl-main .btn.sc-wcl-btn-soft {
  background: rgba(27, 30, 40, 0.95) !important;
}

.sc-wcl-main .btn.sc-wcl-fav.is-on {
  color: var(--wcl-fav) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  background: rgba(251, 191, 36, 0.1) !important;
}

.sc-wcl-main .btn.sc-wcl-read.is-on {
  color: var(--wcl-read) !important;
  border-color: rgba(74, 222, 128, 0.45) !important;
  background: rgba(74, 222, 128, 0.1) !important;
}

.sc-wcl-toolbar {
  display: grid;
  gap: 0.95rem;
  margin-bottom: 1.1rem;
  padding: 16px;
  border: 1px solid var(--border, #272b36);
  border-radius: var(--wcl-radius);
  background: rgba(21, 23, 31, 0.72);
}

.sc-wcl-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.05rem;
  border: 1px solid var(--border, #272b36);
  border-radius: 14px;
  background: rgba(11, 12, 16, 0.65);
}

.sc-wcl-search > span[aria-hidden="true"] {
  color: #9aa6ff;
  font-size: 1rem;
}

.sc-wcl-search input {
  width: 100%;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  color: var(--heading, #fff);
  font: inherit;
}

.sc-wcl-filters,
.sc-wcl-view-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sc-wcl-filter {
  appearance: none;
  border: 1px solid var(--border, #272b36) !important;
  background: rgba(11, 12, 16, 0.55) !important;
  color: var(--muted, #78838f) !important;
  border-radius: 99px !important;
  padding: 0.48rem 0.95rem !important;
  min-height: 0 !important;
  height: auto !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sc-wcl-filter:hover,
.sc-wcl-filter.is-active {
  color: var(--heading, #fff) !important;
  border-color: rgba(109, 123, 255, 0.55) !important;
  background: rgba(109, 123, 255, 0.16) !important;
}

.sc-wcl-view-filters .sc-wcl-filter.is-active {
  border-color: rgba(168, 85, 247, 0.55) !important;
  background: rgba(168, 85, 247, 0.16) !important;
}

.sc-wcl-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 0.95rem;
}

.sc-wcl-status {
  margin: 0;
  color: var(--muted, #78838f);
  font-size: 0.9rem;
}

/* Master-detail shell */
.sc-wcl-md {
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 0;
  min-height: 680px;
  border: 1px solid rgba(109, 123, 255, 0.22);
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(109, 123, 255, 0.05), transparent 120px),
    rgba(16, 18, 25, 0.92);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.sc-wcl-list {
  border-right: 1px solid var(--border, #272b36);
  overflow: auto;
  max-height: min(78vh, 860px);
  background: rgba(21, 23, 31, 0.55);
}

.sc-wcl-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid rgba(39, 43, 54, 0.9);
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  min-height: 0 !important;
  box-shadow: none !important;
  transition: background 0.15s ease;
}

.sc-wcl-row:hover {
  background: rgba(109, 123, 255, 0.07) !important;
}

.sc-wcl-row.is-selected {
  background: rgba(109, 123, 255, 0.12) !important;
  box-shadow: inset 3px 0 0 var(--wcl-accent) !important;
}

.sc-wcl-row.is-read .sc-wcl-row-title {
  color: var(--muted, #78838f);
}

.sc-wcl-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.sc-wcl-row-title {
  margin: 0 0 6px;
  color: var(--heading, #fff);
  font-family: "Poppins", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
}

.sc-wcl-row-quick {
  margin: 0;
  color: var(--muted, #78838f);
  font-size: 0.84rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sc-wcl-row-actions {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.sc-wcl-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 99px !important;
  border: 1px solid var(--border, #272b36) !important;
  background: rgba(11, 12, 16, 0.55) !important;
  color: var(--muted, #78838f) !important;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  min-height: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.sc-wcl-icon-btn:hover {
  color: var(--heading, #fff) !important;
  border-color: var(--wcl-accent) !important;
}

.sc-wcl-icon-btn.sc-wcl-fav.is-on {
  color: var(--wcl-fav) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  background: rgba(251, 191, 36, 0.12) !important;
}

.sc-wcl-icon-btn.sc-wcl-read.is-on {
  color: var(--wcl-read) !important;
  border-color: rgba(74, 222, 128, 0.45) !important;
  background: rgba(74, 222, 128, 0.12) !important;
}

.sc-wcl-detail {
  padding: 24px 26px 28px;
  overflow: auto;
  max-height: min(78vh, 860px);
  background: rgba(11, 12, 16, 0.28);
}

.sc-wcl-detail-placeholder {
  display: grid;
  place-content: center;
  min-height: 320px;
  text-align: center;
  color: var(--muted, #78838f);
}

.sc-wcl-detail-placeholder strong {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--heading, #fff);
  font-family: "Poppins", sans-serif;
}

.sc-wcl-detail-placeholder p {
  margin: 0;
}

.sc-wcl-detail-head {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border, #272b36);
}

.sc-wcl-detail-head h3 {
  margin: 10px 0 8px;
  color: var(--heading, #fff);
  font-size: clamp(1.2rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
}

.sc-wcl-detail-head .sc-wcl-row-quick {
  -webkit-line-clamp: 4;
  font-size: 0.95rem;
}

.sc-wcl-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  border: 1px solid var(--border, #272b36);
  background: rgba(27, 30, 40, 0.9);
  color: var(--muted, #78838f);
  font-size: 0.72rem;
  font-weight: 600;
}

.sc-wcl-badge-cat {
  color: #c4cbff;
  border-color: rgba(109, 123, 255, 0.4);
  background: rgba(109, 123, 255, 0.14);
}

.sc-wcl-badge-tools {
  color: #f0c674;
  border-color: rgba(240, 198, 116, 0.35);
  background: rgba(240, 198, 116, 0.1);
}

.sc-wcl-detail-block {
  margin: 0 0 1.15rem;
  padding: 14px 16px;
  border: 1px solid var(--border, #272b36);
  border-radius: 14px;
  background: rgba(21, 23, 31, 0.55);
}

.sc-wcl-detail-block h4 {
  margin: 0 0 0.55rem;
  color: #c8ceff;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sc-wcl-detail-block p {
  margin: 0;
  color: var(--text, #c6ccd8);
  line-height: 1.65;
}

.sc-wcl-steps {
  margin: 0;
  padding-left: 1.2rem;
}

.sc-wcl-steps li {
  margin: 0 0 0.5rem;
  color: var(--text, #c6ccd8);
  line-height: 1.55;
}

.sc-wcl-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 1rem;
  color: var(--muted, #78838f);
  font-size: 0.88rem;
}

.sc-wcl-disclaimer {
  margin: 0.85rem 0 0;
  color: var(--muted, #78838f);
  font-size: 0.8rem;
  font-style: italic;
}

.sc-wcl-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #272b36);
}

/* Single clean command block */
.sc-wcl-detail pre.sc-code-block,
.sc-wcl-detail pre {
  margin: 0.35rem 0 0;
  padding: 16px 18px;
  overflow-x: auto;
  white-space: pre-wrap;
  tab-size: 2;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #e6edf3;
  background: #0a0e14;
  border: 1px solid #30363d;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sc-wcl-detail pre.sc-code-block code,
.sc-wcl-detail pre code {
  display: block;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  background: transparent !important;
  border: none !important;
  white-space: inherit;
  box-shadow: none !important;
}

.sc-wcl-detail :not(pre) > code {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  color: #d7dce8;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.sc-wcl-empty {
  margin: 1.5rem 0 0;
  padding: 1.5rem;
  text-align: center;
  border: 1px dashed var(--border, #272b36);
  border-radius: 16px;
  color: var(--muted, #78838f);
}

.sc-wcl-empty strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--heading, #fff);
}

.sc-wcl-loading-inline {
  color: var(--muted, #78838f);
  font-size: 0.9rem;
}

@media (max-width: 1100px) {
  .sc-wcl-md {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .sc-wcl-md {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .sc-wcl-list {
    border-right: 0;
    border-bottom: 1px solid var(--border, #272b36);
    max-height: 42vh;
  }

  .sc-wcl-detail {
    max-height: none;
    padding: 18px 16px 22px;
  }
}

@media (max-width: 860px) {
  .sc-wcl-stats {
    grid-template-columns: 1fr;
  }

  .sc-wcl-section-heading {
    align-items: flex-start;
  }
}
