/* Elomia Screening Apps · legal site. No scripts, no external assets (CSP: default-src 'none'; style-src 'self'). */

:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --inset: #eeeef3;
  --text: #1d1d1f;
  --text-2: #48484d;
  --muted: #6e6e73;
  --border: rgba(0, 0, 0, 0.08);
  --separator: rgba(0, 0, 0, 0.12);
  --accent: #4b5bd6;
  --accent-tint: rgba(75, 91, 214, 0.1);
  --accent-text: #3d4bc0;
  --on-accent: #ffffff;
  --danger: #c6323f;
  --header: rgba(245, 245, 247, 0.82);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --radius: 20px;
  --radius-sm: 12px;
  --gutter: 16px;
  --header-height: 56px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1014;
    --card: #1b1c21;
    --inset: #24252c;
    --text: #f2f2f5;
    --text-2: #c7c7cf;
    --muted: #9a9aa3;
    --border: rgba(255, 255, 255, 0.08);
    --separator: rgba(255, 255, 255, 0.12);
    --accent: #8f9cff;
    --accent-tint: rgba(143, 156, 255, 0.14);
    --accent-text: #a4aeff;
    --on-accent: #0f1014;
    --danger: #ff6b76;
    --header: rgba(15, 16, 20, 0.78);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent-text);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection {
  background: var(--accent-tint);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

.site-header .inner,
main,
.site-footer .inner {
  max-width: 760px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand .label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand .mark {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--accent);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.18);
  flex: none;
}

.brand .mark::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  width: 6px;
  height: 10px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(45deg);
}

.segments {
  display: inline-flex;
  flex: none;
  padding: 3px;
  gap: 2px;
  border-radius: 999px;
  background: var(--inset);
  border: 1px solid var(--border);
}

.segments a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.segments a:hover {
  text-decoration: none;
  color: var(--text);
}

.segments a:active {
  transform: scale(0.97);
}

.segments a[aria-current="page"] {
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* ---------- Document ---------- */

main {
  padding-top: 28px;
  padding-bottom: 56px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 700;
  margin: 0 0 12px;
}

.dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.dates li {
  margin: 0;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--inset);
  border: 1px solid var(--border);
}

.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-2);
}

/* On this page */

.toc {
  margin: 24px 0 8px;
  padding: 16px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.toc h2 {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 2;
  column-gap: 28px;
}

.toc li {
  margin: 0;
  break-inside: avoid;
}

.toc a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.toc a::after {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin-right: 3px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  opacity: 0.7;
}

.toc a:hover {
  color: var(--accent-text);
  text-decoration: none;
}

h2 {
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 700;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--separator);
  position: relative;
}

h2:target {
  color: var(--accent-text);
}

h2:target::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--gutter));
  top: 24px;
  bottom: 2px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  animation: mark 2.4s ease forwards;
}

h3 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 26px 0 8px;
}

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

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 8px;
}

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

strong {
  font-weight: 600;
}

.callout {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0;
  box-shadow: var(--shadow);
}

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

.callout strong {
  color: var(--danger);
}

/* Tables read as cards */

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 12px 0 22px;
  font-size: 15px;
  line-height: 1.5;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

caption {
  text-align: left;
  font-weight: 600;
  padding-bottom: 8px;
  caption-side: top;
}

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

th {
  background: var(--inset);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

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

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

.site-footer .inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 20px;
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.site-footer a {
  color: var(--text-2);
  font-weight: 500;
}

.to-top::before {
  content: "↑ ";
}

/* ---------- Landing ---------- */

.landing .site-header .inner {
  justify-content: center;
}

.landing main {
  padding-top: 48px;
  max-width: 600px;
}

.hero {
  text-align: center;
  margin: 0 0 28px;
}

.hero h1 {
  font-size: 36px;
}

.hero p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-2);
  margin: 0;
}

.apps {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 18px 8px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.apps li {
  margin: 0;
  text-align: center;
}

.tile {
  display: block;
  width: 60px;
  height: 60px;
  margin: 0 auto 8px;
  border-radius: 15px;
  background: var(--tile, #4b5bd6);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.apps .name {
  display: block;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--text-2);
}

.app-adhd { --tile: #7e2558; }
.app-alcohol { --tile: #727e25; }
.app-anxiety { --tile: #7e3e25; }
.app-aspergers { --tile: #7e2572; }
.app-attachment { --tile: #257e3e; }
.app-autism-adults { --tile: #7e5825; }
.app-autism-children { --tile: #72257e; }
.app-bipolar { --tile: #3e7e25; }
.app-bpd { --tile: #587e25; }
.app-codependency { --tile: #257e72; }
.app-cptsd { --tile: #257e25; }
.app-depression { --tile: #7e2525; }
.app-drug-use { --tile: #58257e; }
.app-eating-disorder { --tile: #25257e; }
.app-love-languages { --tile: #25727e; }
.app-narcissism { --tile: #253e7e; }
.app-ocd { --tile: #7e253e; }
.app-psychopathy { --tile: #25587e; }
.app-ptsd { --tile: #7e7225; }
.app-self-esteem { --tile: #257e58; }
.app-stress { --tile: #3e257e; }

.section-title {
  margin: 0 0 10px 4px;
  padding: 0;
  border: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.list {
  display: block;
  margin: 0 0 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 16px 20px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.list a:last-child {
  border-bottom: 0;
}

.list a:hover {
  text-decoration: none;
  background: var(--inset);
}

.list a:active {
  background: var(--inset);
}

.list .text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.list .title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.list .detail {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.list a::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg);
  opacity: 0.6;
}

.foot-note {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Motion ---------- */

@keyframes mark {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

main > * {
  animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

main > :nth-child(2) { animation-delay: 0.03s; }
main > :nth-child(3) { animation-delay: 0.06s; }
main > :nth-child(4) { animation-delay: 0.09s; }
main > :nth-child(5) { animation-delay: 0.12s; }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  main > *,
  h2:target::before {
    animation: none;
  }

  .segments a,
  .list a {
    transition: none;
  }
}

/* ---------- Phone ---------- */

@media (max-width: 640px) {
  :root {
    --header-height: 52px;
  }

  body {
    font-size: 16px;
  }

  .brand .label {
    font-size: 15px;
  }

  .segments a {
    padding: 6px 12px;
    font-size: 13px;
  }

  main {
    padding-top: 22px;
  }

  h1 {
    font-size: 28px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .lead {
    font-size: 17px;
  }

  h2 {
    font-size: 21px;
    margin-top: 32px;
    padding-top: 20px;
  }

  h3 {
    font-size: 17px;
  }

  .toc ol {
    columns: 1;
  }

  .apps {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 6px;
  }

  .tile {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

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

  table {
    background: none;
    border: 0;
    box-shadow: none;
    overflow: visible;
  }

  thead {
    position: absolute;
    left: -9999px;
  }

  tr {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    overflow: hidden;
  }

  td {
    border: 0;
    border-top: 1px solid var(--border);
  }

  td:first-child {
    border-top: 0;
    background: var(--inset);
    font-weight: 600;
  }

  td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
  }

  td:first-child::before {
    display: none;
  }
}

@media (max-width: 380px) {
  .brand .label {
    display: none;
  }
}

/* ---------- Print ---------- */

@media print {
  .site-header,
  .site-footer,
  .toc {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }

  main > * {
    animation: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  table,
  .callout {
    box-shadow: none;
  }
}
