/* yourside.ai — tool-shell: sticky hero + progress bar pattern.
 * Opt-in: load this only on tool pages that want the progress hero.
 */

.tool-hero {
  position: sticky;
  top: var(--hero-sticky-top);
  z-index: 30;
  padding: 8px 0 0;
  margin-bottom: var(--space-4);
  backdrop-filter: blur(14px);
}

.tool-hero .hero-card {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
}

.tool-hero .hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.tool-hero h1 {
  margin: var(--space-1) 0 var(--space-2);
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  line-height: 1.05;
}

.tool-hero .subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.45;
  max-width: 64ch;
}

.tool-hero .hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
  min-width: 0;
}

/* Stat / summary row used above the progress bar */
.summary-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}

.stat .label {
  display: block;
  color: var(--muted);
  font-size: var(--fs-tiny);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat .value {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
}

/* Progress bar */
.progress-wrap { margin-top: var(--space-3); }

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--text-secondary);
  font-size: var(--fs-small);
  margin-bottom: var(--space-2);
}

.progress-track {
  width: 100%;
  height: 12px;
  background: color-mix(in srgb, var(--border) 65%, transparent);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), #0EA5E9);
  border-radius: var(--radius-pill);
  transition: width 180ms ease;
}

/* Tool layout wrapper */
.tool-layout {
  width: min(var(--container), calc(100% - 2rem));
  margin: 0 auto;
  padding: var(--space-4) 0 var(--space-16);
}

/* Collapsible section pattern */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.section-card + .section-card { margin-top: var(--space-3); }

.section-card summary,
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  gap: var(--space-3);
}
.section-card summary::-webkit-details-marker { display: none; }

.section-card[open] summary,
.section-card[open] .section-header {
  border-bottom: 1px solid var(--border);
}

.section-content {
  padding: var(--space-4) var(--space-5) var(--space-5);
}

/* Checklist items */
.check-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  line-height: 1.45;
}
.check-item + .check-item { border-top: 1px dashed var(--border); }
.check-item input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.check-item.is-checked span {
  color: var(--muted);
  text-decoration: line-through;
}
