/*
 * deadlines.css — /deadlines/ Status Deadline Calendar hub.
 *
 * Uses existing mm-* design tokens (lib/app.css), the same tokens
 * comparison.css and devaluations.css already draw from. No new hex values.
 * Table breakpoint at 640px flattens rows into stacked cards, mirroring
 * comparison.css's .mm-compare mobile pattern, so the table never forces the
 * page body to scroll horizontally: the desktop table scrolls inside its own
 * .dl-table-wrap instead.
 */

.dl-page {
  max-width: 1080px;
}

.dl-hero {
  padding: 32px 0 24px;
  border-bottom: 1px solid var(--color-neutral-200);
  margin-bottom: 24px;
}

.dl-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent-700);
}

.dl-hero__icon {
  width: 18px;
  height: 18px;
  color: var(--color-accent-700);
}

.dl-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
  color: var(--color-text-strong);
}

.dl-hero p {
  max-width: 68ch;
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.5;
}

.dl-hero__stamp {
  font-size: 13px;
  color: var(--color-text-muted);
}

.dl-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
}

.dl-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--color-accent-700);
  color: var(--color-bg-surface);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.dl-hero__cta:hover,
.dl-hero__cta:focus-visible {
  background: var(--color-accent-800, var(--color-accent-700));
}

.dl-icon {
  width: 18px;
  height: 18px;
}

.dl-hero__subscribe {
  font-size: 13px;
  color: var(--color-text-muted);
}

.dl-hero__subscribe code {
  background: var(--color-bg-alt);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
}

/* Desktop table: scrolls inside its own container, never the page body. */
.dl-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0 32px;
}

.dl-table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-neutral-200);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
  color: var(--color-text);
}

.dl-table__caption {
  caption-side: top;
  text-align: left;
  padding: 14px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-neutral-200);
}

.dl-table thead th {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-neutral-200);
  padding: 12px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-strong);
  white-space: nowrap;
}

.dl-table tbody tr:not(:last-child) th,
.dl-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--mm-border-subtle);
}

.dl-table th[scope="row"],
.dl-table td {
  padding: 12px 14px;
  vertical-align: top;
}

.dl-row__name {
  display: block;
  font-weight: 600;
  color: var(--color-text-strong);
}

.dl-row__px-link {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-accent-700);
}

.dl-cell__date {
  display: block;
  font-weight: 500;
}

.dl-cell__gap {
  display: block;
  color: var(--color-text-muted);
  font-style: italic;
  font-size: 13px;
  line-height: 1.4;
}

.dl-cell__src {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
  text-decoration: underline;
}

.dl-cell__change {
  color: var(--color-accent-700);
  font-size: 13px;
  text-decoration: underline;
}

.dl-empty {
  padding: 24px;
  text-align: center;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border-radius: 12px;
}

.dl-faq {
  margin: 32px 0 48px;
  padding-top: 24px;
  border-top: 1px solid var(--color-neutral-200);
}

.dl-faq h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--color-text-strong);
}

.dl-faq__item {
  margin-bottom: 18px;
}

.dl-faq__item h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--color-text-strong);
}

.dl-faq__item p {
  color: var(--color-text);
  line-height: 1.5;
}

/* Mobile: flatten the table into stacked cards, same pattern as
 * comparison.css's .mm-compare mobile breakpoint. data-label on each td/th
 * supplies the row-label text via ::before so headers can vanish. */
@media (max-width: 640px) {
  .dl-table-wrap {
    overflow-x: visible;
  }
  .dl-table {
    min-width: 0;
    border: 0;
    background: transparent;
  }
  .dl-table__caption {
    border-radius: 12px 12px 0 0;
    border: 1px solid var(--color-neutral-200);
    border-bottom: 0;
  }
  .dl-table thead {
    display: none;
  }
  .dl-table tbody tr {
    display: block;
    background: var(--color-bg-surface);
    border: 1px solid var(--color-neutral-200);
    border-top: 0;
    padding: 4px 0;
  }
  .dl-table tbody tr:first-child {
    border-top: 1px solid var(--color-neutral-200);
  }
  .dl-table tbody tr:last-child {
    border-radius: 0 0 12px 12px;
  }
  .dl-table th[scope="row"],
  .dl-table td {
    display: block;
    border-bottom: 0 !important;
    padding: 6px 16px;
  }
  .dl-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 2px;
  }
}
