/* Next data donation manual — styled after the Next platform (next.eyra.co) */

:root {
  --primary: #4272ef;
  --primary-light: #e3eafd;
  --secondary: #ff5e5e;
  --tertiary: #ffcf60;
  --success: #52ba12;
  --warning: #f28d15;
  --delete: #db1e1e;
  --grey1: #222222;
  --grey2: #999999;
  --grey3: #cccccc;
  --grey4: #eeeeee;
  --grey5: #f6f6f6;
  --grey6: #fafafa;
  --white: #ffffff;
  --shadow-floating: 0 5px 20px 0 rgba(0, 0, 0, 0.1);
  --sidebar-w: 296px;
  --font-title: "Nunito", sans-serif;
  --font-body: "Nunito Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--grey5);
  color: var(--grey1);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); }

/* ---------- Layout ---------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  flex: 0 0 var(--sidebar-w);
  width: var(--sidebar-w);
  height: 100vh;
  overflow-y: auto;
  padding: 40px 32px 32px 40px;
  background: var(--grey5);
}

.sidebar .logo { display: block; margin-bottom: 40px; }
.sidebar .logo img { width: 132px; height: auto; display: block; }

.toc { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--grey1);
  text-decoration: none;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
}
.toc a .num {
  flex: 0 0 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--grey4);
  color: var(--grey2);
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  transform: translateY(-1px);
}
.toc a:hover { background: var(--grey4); }
.toc a.active { background: var(--grey4); color: var(--primary); }
.toc a.active .num { background: var(--primary); color: var(--white); }

.content {
  flex: 1;
  min-width: 0;
  margin-top: 40px;
  background: var(--white);
  border-top: 1px solid var(--grey4);
  border-left: 1px solid var(--grey4);
}

/* ---------- Header banner (as on Next pages) ---------- */

.banner {
  position: relative;
  overflow: hidden;
  background: var(--primary);
  color: var(--white);
  padding: 56px 56px 48px;
  min-height: 184px;
}
.banner h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 50px;
  line-height: 55px;
}
.banner p {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  font-size: 20px;
  max-width: 640px;
  opacity: 0.95;
}
.banner svg.shapes {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 520px;
  max-width: 45%;
}
@media (max-width: 1280px) { .banner svg.shapes { opacity: 0.35; } }

.page { padding: 16px 56px 96px; max-width: 1180px; }

/* ---------- Typography ---------- */

h2, h3, h4 { font-family: var(--font-title); color: var(--grey1); }

.chapter { padding-top: 56px; }
.chapter + .chapter { border-top: 1px solid var(--grey4); margin-top: 32px; }

.chapter > h2 {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 16px;
  font-weight: 800;
  font-size: 40px;
  line-height: 44px;
}
.chapter > h2 .num {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 22px;
  line-height: 44px;
  text-align: center;
}
.chapter > p.lead { font-size: 20px; line-height: 30px; margin: 0 0 24px; max-width: 820px; }

h3 {
  margin: 40px 0 12px;
  font-weight: 800;
  font-size: 28px;
  line-height: 32px;
}

p, li { max-width: 860px; }

strong.ui {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--grey1);
  white-space: nowrap;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--grey5);
  border: 1px solid var(--grey4);
  border-radius: 4px;
  padding: 1px 6px;
  word-break: break-all;
}

/* ---------- Steps ---------- */

ol.steps { list-style: none; counter-reset: step; margin: 16px 0 0; padding: 0; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 0 56px;
  margin: 0 0 28px;
  max-width: none;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 16px;
  line-height: 32px;
  text-align: center;
}
ol.steps > li > p:first-child { margin-top: 2px; }

/* numbered marker that matches the coral badges in the screenshots */
.mark {
  display: inline-block;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--secondary);
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  vertical-align: 2px;
}

ul.marks { list-style: none; padding: 0; margin: 12px 0; }
ul.marks li { margin: 6px 0; padding-left: 34px; position: relative; }
ul.marks li > .mark:first-child { position: absolute; left: 0; top: 4px; }

/* ---------- Screenshots ---------- */

figure.shot { margin: 16px 0 8px; max-width: 100%; }
figure.shot a.zoom {
  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--grey4);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-floating);
  cursor: zoom-in;
  line-height: 0;
  position: relative;
}
figure.shot img { display: block; max-width: 100%; height: auto; }
figure.shot.narrow img { max-width: 560px; width: 100%; }
figure.shot.medium img { max-width: 820px; width: 100%; }
figure.shot a.zoom::after {
  content: "Click to enlarge";
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34, 34, 34, 0.75);
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 12px;
  line-height: 16px;
  opacity: 0;
  transition: opacity 0.15s;
}
figure.shot a.zoom:hover::after, figure.shot a.zoom:focus-visible::after { opacity: 1; }
figure.shot figcaption { margin-top: 8px; font-size: 14px; color: var(--grey2); }

.shot-pair { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.shot-pair figure.shot { flex: 1 1 360px; }

/* ---------- Callouts ---------- */

.note {
  display: flex;
  gap: 14px;
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 8px;
  max-width: 860px;
  font-size: 17px;
  line-height: 1.55;
}
.note::before {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 15px;
  line-height: 26px;
  text-align: center;
  color: var(--white);
}
.note p { margin: 0; }
.note p + p { margin-top: 8px; }
.note.tip { background: var(--primary-light); }
.note.tip::before { content: "i"; background: var(--primary); }
.note.warning { background: #fff1e0; }
.note.warning::before { content: "!"; background: var(--warning); }
.note.danger { background: #fde8e8; }
.note.danger::before { content: "!"; background: var(--delete); }

/* ---------- Intro blocks ---------- */

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0;
  max-width: 980px;
}
.flow .card {
  background: var(--grey5);
  border-radius: 8px;
  padding: 20px 22px;
}
.flow .card .tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 13px;
  background: var(--primary-light);
  color: var(--primary);
}
.flow .card h4 { margin: 10px 0 6px; font-size: 20px; line-height: 24px; font-weight: 800; }
.flow .card p { margin: 0; font-size: 16px; line-height: 1.5; }

table.info {
  border-collapse: collapse;
  margin: 16px 0;
  max-width: 900px;
  width: 100%;
  font-size: 16px;
}
table.info th, table.info td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--grey4); vertical-align: top; }
table.info th { font-family: var(--font-title); font-weight: 800; font-size: 15px; color: var(--grey2); }
table.info td:first-child { font-family: var(--font-title); font-weight: 800; white-space: nowrap; }

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 4px;
  background: var(--primary);
  color: var(--white);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 16px;
  line-height: 18px;
  text-decoration: none;
}

.footer {
  padding: 24px 56px;
  text-align: center;
  font-size: 14px;
  color: var(--grey2);
  background: var(--grey5);
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.lightbox.open { display: flex; }
.lightbox .panel {
  position: relative;
  max-width: min(1920px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow-floating);
  overflow: hidden;
}
.lightbox img { display: block; max-width: 100%; max-height: calc(100vh - 120px); object-fit: contain; }
.lightbox .bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--grey4);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 15px;
}
.lightbox .bar .caption { flex: 1; color: var(--grey1); font-weight: 600; font-family: var(--font-body); }
.lightbox button {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
  padding: 4px 8px;
}
.lightbox button:disabled { color: var(--grey3); cursor: default; }

/* ---------- Mobile ---------- */

.menu-toggle { display: none; }

@media (max-width: 960px) {
  .layout { display: block; }
  .sidebar {
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: var(--shadow-floating);
  }
  .sidebar.open { transform: none; }
  .menu-toggle {
    display: block;
    position: fixed;
    z-index: 60;
    right: 16px;
    bottom: 16px;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    background: var(--primary);
    color: var(--white);
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 16px;
    box-shadow: var(--shadow-floating);
  }
  .content { margin-top: 0; border: 0; }
  .banner { padding: 40px 16px 32px; }
  .banner h1 { font-size: 36px; line-height: 40px; }
  .banner svg.shapes { opacity: 0.35; }
  .page { padding: 8px 16px 80px; }
  .chapter > h2 { font-size: 30px; line-height: 34px; }
  .chapter > h2 .num { flex-basis: 36px; height: 36px; line-height: 36px; font-size: 18px; }
  h3 { font-size: 22px; line-height: 26px; }
  ol.steps > li { padding-left: 44px; }
  .flow { grid-template-columns: 1fr; }
  table.info td:first-child { white-space: normal; }
}

@media print {
  .sidebar, .menu-toggle, .lightbox { display: none !important; }
  .content { margin: 0; border: 0; }
  figure.shot a.zoom { box-shadow: none; }
  .chapter { break-inside: avoid-page; }
}
