/* Access playbook pages (Bet 1). Extends trip-guide.css. */

.access-main {
  padding-bottom: 64px;
}

/* Path chooser */
.path-chooser {
  display: grid;
  gap: 16px;
  margin: 8px 0 4px;
}

@media (min-width: 720px) {
  .path-chooser {
    grid-template-columns: 1fr 1fr;
  }

  .path-card-wide {
    grid-column: 1 / -1;
  }
}

.path-card {
  background: var(--raised);
  border-radius: var(--r);
  padding: 22px 24px;
  box-shadow: var(--raise-sm), var(--edge);
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  appearance: none;
}

.path-card:hover {
  border-color: rgba(15, 92, 58, 0.2);
}

.path-card[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: var(--raise), var(--edge);
}

.path-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.path-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.path-card .path-tag {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Rules table */
.rules-wrap {
  margin: 8px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  background: var(--raised);
  border-radius: var(--r);
  box-shadow: var(--raise-sm), var(--edge);
  overflow: hidden;
}

.rules-table thead {
  background: var(--ground);
}

.rules-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-soft);
  border-bottom: 1px solid var(--hairline);
}

.rules-table td {
  padding: 14px 16px;
  vertical-align: top;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
}

.rules-table tr:last-child td {
  border-bottom: 0;
}

.rules-table .rule-summary {
  font-weight: 500;
}

.rules-table .applies-to {
  font-size: 13px;
  color: var(--muted);
}

.rules-table .source-link {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.rules-table .checked-on {
  font-size: 12px;
  color: var(--muted-soft);
  white-space: nowrap;
}

.stale-warning {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  background: #fff8e6;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: #7a5c00;
}

/* Mobile: stack rules as cards */
@media (max-width: 640px) {
  .rules-wrap {
    overflow-x: visible;
  }

  .rules-table,
  .rules-table thead,
  .rules-table tbody,
  .rules-table tr,
  .rules-table th,
  .rules-table td {
    display: block;
  }

  .rules-table thead {
    display: none;
  }

  .rules-table tr {
    margin-bottom: 12px;
    background: var(--raised);
    border-radius: var(--r-sm);
    box-shadow: var(--raise-sm), var(--edge);
    padding: 4px 0;
  }

  .rules-table tr:last-child {
    margin-bottom: 0;
  }

  .rules-table td {
    padding: 8px 16px;
    border-bottom: 0;
  }

  .rules-table td::before {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted-soft);
    margin-bottom: 4px;
  }

  .rules-table td:nth-child(1)::before { content: 'Rule'; }
  .rules-table td:nth-child(2)::before { content: 'Applies to'; }
  .rules-table td:nth-child(3)::before { content: 'Official source'; }
  .rules-table td:nth-child(4)::before { content: 'Checked on'; }

  .rules-table .rule-summary {
    font-size: 15px;
  }
}

/* Timeline */
.timeline-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: timeline;
}

.timeline-step {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  padding: 0 0 24px 0;
}

.timeline-step::before {
  counter-increment: timeline;
  content: counter(timeline);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--raised);
  box-shadow: var(--raise-sm), var(--edge);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}

.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17px;
  top: 40px;
  bottom: 0;
  width: 2px;
  background: var(--hairline);
}

.timeline-body h3 {
  margin: 6px 0 6px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.timeline-body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.timeline-example {
  margin: 20px 0 0;
  padding: 18px 20px;
  background: var(--ground);
  border-radius: var(--r-sm);
  box-shadow: var(--recess);
}

.timeline-example h4 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.timeline-example dl {
  margin: 0;
  display: grid;
  gap: 8px;
}

.timeline-example dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-soft);
}

.timeline-example dd {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--ink);
}

/* Course cards on access page */
.access-course-grid {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
}

@media (min-width: 640px) {
  .access-course-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.access-course-card {
  background: var(--raised);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  box-shadow: var(--raise-sm), var(--edge);
}

.access-course-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.access-course-card p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.sourcing-note {
  margin: 24px 0 0;
  padding: 14px 16px;
  background: var(--ground);
  border-radius: var(--r-sm);
  box-shadow: var(--recess);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
