/* ==========================================================================
   Privacy & Cookie Policy page (privacy.html). Reuses .page-header (title
   block) and .body-text (paragraph color/size) straight from css/main.css
   -- only what's specific to this page's longer, structured content
   (section headings, bullet lists, the cookie table) lives here.
   ========================================================================== */

.policy-body {
  max-width: 760px;
}

.policy-body h2 {
  font-size: 1.4rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  margin-top: 56px;
  margin-bottom: 16px;
}

.policy-body h2:first-child {
  margin-top: 0;
}

.policy-body .body-text {
  max-width: none; /* the section container already caps width -- .body-text's own 640px cap would needlessly narrow it further inside a 760px column */
  margin-bottom: 16px;
}

.policy-body .body-text:last-child {
  margin-bottom: 0;
}

/* Global `ul { list-style: none; }` (css/main.css) is right for nav/footer
   lists but wrong for actual bulleted content -- restored here, scoped to
   this page only. */
.policy-body ul {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 16px;
}

.policy-body ul:last-child {
  margin-bottom: 0;
}

.policy-body li {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 10px;
}

.policy-body li:last-child {
  margin-bottom: 0;
}

/* ---- Cookie table ---- */

.policy-table-wrap {
  margin: 24px 0;
  overflow-x: auto; /* belt-and-suspenders: still scrollable if a future
                        edit through the admin ever adds an unusually wide
                        column, even though the stacked layout below
                        already handles the normal narrow-viewport case */
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.policy-table th,
.policy-table td {
  text-align: left;
  padding: 12px 16px;
  border: 1px solid var(--border);
  vertical-align: top;
}

.policy-table th {
  color: var(--text);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-elevated);
  white-space: nowrap;
}

.policy-table td {
  color: var(--text-dim);
  line-height: 1.5;
}

/* Below this width the 4-column table gets too cramped to stay readable
   as a grid -- reflow each row into its own stacked card instead of
   letting cells squish or forcing horizontal scroll. Each <td>'s
   data-label attribute (set in privacy.html) supplies the column header
   as an inline label via ::before, so no information is lost. Same
   640px "narrow mobile" breakpoint this project already uses elsewhere
   (css/gallery.css, css/lightbox.css, css/client.css). */
@media (max-width: 640px) {
  .policy-table thead {
    display: none;
  }

  .policy-table,
  .policy-table tbody,
  .policy-table tr,
  .policy-table td {
    display: block;
    width: 100%;
  }

  .policy-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--border);
  }

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

  .policy-table td {
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
  }

  .policy-table td:last-child {
    border-bottom: none;
  }

  .policy-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--text);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 4px;
  }
}
