/* ==========================================================================
   layout.css — Page structure, columns, spacing system
   ========================================================================== */

/* ── Type scale ──────────────────────────────────────────────────────────── */
.h1 {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
.h1-tight { line-height: 1.10; }

.h2 {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}

.h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

.p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}
.p-strong { font-weight: 600; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  opacity: 0.85;
}

.tiny {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.link {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: opacity var(--transition);
}
.link:hover { opacity: 0.78; text-decoration: underline; }

/* ── Stack utility ───────────────────────────────────────────────────────── */
.stack        { display: flex; flex-direction: column; }
.stack-sm     { gap: 10px; }
.stack-md     { gap: 18px; }
.stack-lg     { gap: 28px; }
.stack > *    { min-width: 0; }

/* ── Grid ────────────────────────────────────────────────────────────────── */
.grid     { display: grid; gap: 14px; }
.grid-2   { grid-template-columns: 1fr 1fr; }

@media (max-width: 680px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* ── App shell ───────────────────────────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  flex: 1;
  min-height: 0;
}

/* ── Content area ────────────────────────────────────────────────────────── */
.content {
  padding: 28px 0 48px;
}

.content--task {
  padding-top: 32px;
  padding-bottom: 56px;
}

.content__inner {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

.content__inner--narrow {
  max-width: 720px;
}

.dashboard-main {
  padding: 28px 0 48px;
  min-width: 0;
}

/* ── Panel ───────────────────────────────────────────────────────────────── */
.panel {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--panel);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.panel--soft {
  background: var(--panel-2);
  border-color: var(--border);
}

.panel__head {
  margin-bottom: 14px;
}

/* ── Footnav ─────────────────────────────────────────────────────────────── */
.footnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 8px;
}

/* ── Complete row ────────────────────────────────────────────────────────── */
.completeRow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Hint ────────────────────────────────────────────────────────────────── */
.hint {
  font-size: 13px;
  color: var(--accent-cyan);
  opacity: 0.88;
  margin-top: 6px;
}

/* ── Details / collapsible ───────────────────────────────────────────────── */
.details {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-2);
  overflow: hidden;
}

.details__summary {
  cursor: pointer;
  padding: 14px 18px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  list-style: none;
  user-select: none;
  transition: color var(--transition);
}
.details__summary::-webkit-details-marker { display: none; }
.details__summary:hover { color: var(--text); }

.details[open] .details__summary { color: var(--text); }

.details__body {
  padding: 0 18px 18px;
}

/* ── Progress meta ───────────────────────────────────────────────────────── */
.progmeta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.progmeta__item { display: flex; flex-direction: column; gap: 4px; }
.progmeta__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* ── Progress list ───────────────────────────────────────────────────────── */
.proglist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progitem {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
  transition: border-color var(--transition);
}

.progitem[data-complete="true"] {
  border-color: var(--accent-cyan-edge);
  background: var(--accent-cyan-dim);
}

.progdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  flex-shrink: 0;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.progitem[data-complete="true"] .progdot {
  border-color: var(--accent-cyan);
  background: var(--accent-cyan);
  box-shadow: 0 0 8px rgba(34,211,238,0.50);
}

.proglabel {
  font-size: 13px;
  color: var(--text-muted);
}
.progitem[data-complete="true"] .proglabel { color: var(--text); }

.progbadge {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-md);
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  white-space: nowrap;
}
.progitem[data-complete="true"] .progbadge {
  border-color: var(--accent-cyan-edge);
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
}

.proglink {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  transition: border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.proglink:hover {
  border-color: var(--border-hi);
  color: var(--text);
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .progitem {
    grid-template-columns: 12px 1fr auto;
  }
  .proglink { display: none; }

  .progmeta { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .content__inner { padding: 0 18px; }
  .footnav { flex-direction: column; align-items: flex-start; }
  .progmeta { grid-template-columns: 1fr; }
}

/* ── Dashboard two-column grid ───────────────────────────────────────────── */
.dashGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 920px) {
  .dashGrid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Tool card (inside Tools panel) ─────────────────────────────────────── */
.toolcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.025);
  transition: border-color var(--transition), background var(--transition);
}

.toolcard:hover {
  border-color: var(--border-hi);
  background: rgba(255,255,255,0.04);
}

.toolcard__body {
  flex: 1;
  min-width: 0;
}

.toolcard__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.toolcard__desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.toolcard__btn {
  flex-shrink: 0;
  font-size: 13px;
  padding: 7px 14px;
}
