/* Checklist page — extends ../css/styles.css */

.checklist-intro {
  padding: clamp(3rem, 8vw, 4.75rem) 0 clamp(2rem, 5vw, 3rem);
  background: linear-gradient(165deg, var(--brand-soft) 0%, rgba(248, 250, 249, 0.92) 42%, var(--bg) 100%);
  border-bottom: 1px solid var(--line-faint);
}

.checklist-intro h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.85rem;
}

.checklist-lead {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.checklist-body {
  padding: clamp(2.25rem, 6vw, 3.5rem) 0 clamp(3.5rem, 9vw, 5.5rem);
}

.checklist-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(1.5rem, 4vw, 2rem);
}

.checklist-tabs button {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.checklist-tabs button:hover {
  color: var(--brand-dark);
  border-color: rgba(13, 107, 92, 0.35);
 background: var(--brand-soft);
}

.checklist-tabs button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.checklist-tabs button[aria-selected="true"] {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 16px -8px rgba(13, 107, 92, 0.55);
}

.checklist-tabs button[aria-selected="true"]:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
}

.checklist-panel {
  display: none;
}

.checklist-panel.is-active {
  display: block;
}

.checklist-table-wrap {
  overflow-x: auto;
  margin: 0 -0.25rem;
  padding: 0 0.25rem 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.checklist-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line-faint);
}

.checklist-table caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 1rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink);
}

.checklist-table thead th {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.85rem 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--line-faint);
}

.checklist-table thead th:first-child {
  text-align: left;
  width: 46%;
}

.checklist-table tbody td {
  padding: 0.72rem 0.75rem;
  border-bottom: 1px solid var(--line-faint);
  vertical-align: middle;
}

.checklist-table tbody td:first-child {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
}

.checklist-table tbody td:not(:first-child) {
  text-align: center;
}

.checklist-table tbody tr:last-child td {
  border-bottom: none;
}

.checklist-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 249, 0.65);
}

.chk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  font-weight: 700;
}

.chk--yes {
  color: var(--brand);
  font-size: 1.05rem;
  line-height: 1;
}

.chk--no {
  color: var(--muted);
  opacity: 0.55;
  font-size: 1rem;
}

.chk--x {
  color: #b91c1c;
  font-size: 1rem;
  line-height: 1;
}

.chk--na {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.checklist-cta {
  margin-top: clamp(3rem, 8vw, 4.5rem);
  padding: clamp(2rem, 5vw, 2.75rem);
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--surface) 0%, var(--brand-soft) 100%);
  border: 1px solid rgba(13, 107, 92, 0.18);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.checklist-cta h2 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 0.65rem;
  letter-spacing: -0.02em;
}

.checklist-cta p {
  margin: 0 auto 1.35rem;
  max-width: 36rem;
  color: var(--muted);
  line-height: 1.6;
}

.checklist-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.nav a.is-current {
  color: var(--brand);
  font-weight: 700;
}

@media (min-width: 768px) {
  .checklist-panel__room-title {
    display: none !important;
  }

  .checklist-cards {
    display: none !important;
  }
}

@media (max-width: 767px) {
  /* Tabs: 2×2 grid in a light tray (fits narrow screens) */
  .checklist-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
    margin-bottom: 1.25rem;
    background: rgba(15, 23, 42, 0.04);
    border-radius: var(--radius);
    border: 1px solid var(--line-faint);
  }

  .checklist-tabs button {
    justify-content: center;
    text-align: center;
    width: 100%;
    margin: 0;
    background: transparent;
    border-color: transparent;
    color: var(--muted);
  }

  .checklist-tabs button[aria-selected="true"] {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  }

  .checklist-tabs button[aria-selected="true"]:hover {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
  }

  .checklist-tabs button:not([aria-selected="true"]):hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--brand-dark);
  }

  /* Room heading with accent bar */
  .checklist-panel__room-title {
    font-family: var(--font);
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 1rem;
    padding-left: 0.65rem;
    border-left: 4px solid #2563eb;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.3;
  }

  /* Table → cards (table hidden; cards filled by checklist.js) */
  .checklist-table-wrap .checklist-table {
    display: none !important;
  }

  .checklist-table caption {
    display: none;
  }

  .checklist-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .checklist-card {
    background: var(--surface);
    border: 1px solid var(--line-faint);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-card);
  }

  .checklist-card__task {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    line-height: 1.45;
    color: var(--ink);
  }

  .checklist-card__cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.25rem 0.35rem;
    align-items: start;
  }

  .checklist-card__label {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.3rem;
    line-height: 1.2;
  }

  .checklist-card__mark {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 1.45rem;
  }

  .checklist-card__mark .chk--yes {
    font-size: 1rem;
  }

  .checklist-table thead th {
    padding: 0.65rem 0.5rem;
    font-size: 0.65rem;
  }

  .checklist-table tbody td {
    padding: 0.6rem 0.5rem;
    font-size: 0.875rem;
  }
}
