/* UCLPS privacy policy. Colours mirror uclps/lib/theme/theme.dart. Flat: no shadows. */

:root {
  --primary: #009369;        /* primaryColor / gradientStart */
  --primary-strong: #007a57; /* darker primary for text and badges (WCAG AA on white) */
  --gradient-end: #88c445;
  --text: #1a1c19;           /* textPrimary */
  --text-secondary: #666666;
  --bg: #ffffff;             /* backgroundColor */
  --surface: #f4fdf9;        /* surfaceColor */
  --border: #e0e0e0;         /* borderColor */
  --divider: #eeeeee;        /* dividerColor */
  --on-primary: #ffffff;
  --link: var(--primary-strong);
  --placeholder-bg: #fff3c4;
  --placeholder-text: #6b4e00;
  --placeholder-border: #d9a400;
  --radius: 16px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #2fb385;
    --primary-strong: #4cc79a;
    --text: #e6ebe7;
    --text-secondary: #a3aba6;
    --bg: #0f1411;
    --surface: #161f1a;
    --border: #2a342e;
    --divider: #222b26;
    --on-primary: #0f1411;
    --placeholder-bg: #3a2f0a;
    --placeholder-text: #ffd866;
    --placeholder-border: #8a6d12;
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

.wrap {
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: 16px;
}

@media (min-width: 600px) {
  .wrap {
    padding-inline: 24px;
  }
}

a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

p,
ul,
ol {
  margin-block: 0 14px;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-block: 6px;
}

li::marker {
  color: var(--primary);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--primary-strong);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

/* Header */

.site-header {
  background: var(--surface);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 24px;
}

.logo {
  flex: none;
  width: 58px;
  height: auto;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 2px 0 0;
  color: var(--text-secondary);
}

.accent-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--gradient-end));
}

.meta {
  margin-block: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Cards */

.card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.card ul,
.card ol {
  margin-bottom: 0;
}

.toc {
  margin-top: 16px;
}

.toc ol {
  margin: 0;
}

.toc li {
  margin-block: 0;
  padding-block: 3px;
  break-inside: avoid;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

@media (min-width: 600px) {
  .toc ol {
    columns: 2;
    column-gap: 32px;
  }
}

/* Sections */

section[id] {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--divider);
  scroll-margin-top: 16px;
}

h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 1.35rem;
  line-height: 1.3;
}

.num {
  display: inline-grid;
  flex: none;
  place-items: center;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 8px;
  background: var(--primary-strong);
  color: var(--on-primary);
  font-size: 0.85rem;
  font-weight: 700;
}

h3 {
  margin: 28px 0 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.note {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  background: var(--surface);
}

.checklist {
  padding-left: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.75rem;
}

.checklist li::before {
  content: "\2715";
  content: "\2715" / "";
  position: absolute;
  left: 0.25rem;
  color: var(--text-secondary);
  font-weight: 700;
}

/* Tables */

.table-wrap {
  overflow-x: auto;
  margin-block: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

thead th {
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody th {
  width: 34%;
  font-weight: 600;
}

/* Narrow screens: stack each row so tables never scroll sideways. */
@media (max-width: 520px) {
  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  tr,
  tbody th,
  td {
    display: block;
    width: auto;
  }

  tr {
    padding: 12px 14px;
    border-bottom: 1px solid var(--divider);
  }

  tbody tr:last-child {
    border-bottom: 0;
  }

  tbody th,
  td {
    padding: 0;
    border-bottom: 0;
  }

  tbody th {
    margin-bottom: 2px;
  }
}

/* Deletion request */

.request-card p:last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--primary-strong);
  color: var(--on-primary);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

/* Contact */

.contact-card {
  display: grid;
  gap: 8px;
  font-style: normal;
}

.label {
  display: inline-block;
  min-width: 4.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.placeholder {
  padding: 0 6px;
  border: 1px dashed var(--placeholder-border);
  border-radius: 6px;
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  font-weight: 600;
}

/* Footer */

.site-footer {
  margin-top: 56px;
  padding-block: 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0;
}

/* Print */

@media print {
  :root {
    --text: #000000;
    --text-secondary: #333333;
    --bg: #ffffff;
    --surface: #ffffff;
    --border: #bbbbbb;
    --divider: #dddddd;
    --link: #000000;
    --primary-strong: #000000;
    --on-primary: #ffffff;
  }

  .skip-link,
  .toc,
  .accent-bar {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  section[id] {
    margin-top: 20px;
    padding-top: 16px;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  tr,
  .note,
  .contact-card {
    break-inside: avoid;
  }

  .table-wrap {
    overflow: visible;
  }
}
