/* ============================================================
   CareTrust - base.css v2.2
   Reset, typography defaults, native element styling.
   Every element is legible with ZERO classes applied.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
/* The hidden attribute is authoritative everywhere (D-C10-248): components that
   set their own display (c-btn, c-badge, l-cluster) otherwise defeat the
   user-agent [hidden] rule, so toggling .hidden in JS left elements on screen
   (the empty notification bell, the unneeded history arrows on the splash and
   console bars). Every reveal path removes the attribute, so this is safe. */
[hidden] { display: none !important; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* headings - Fraunces for display, tight leading */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}
h1 { font-size: var(--fs-3xl); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
h5 { font-size: var(--fs-md); }
h6 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }

p { margin: 0; }
p + p { margin-top: var(--sp-md); }
em { font-style: italic; color: var(--action); }              /* brand italic accent */
strong { font-weight: var(--fw-bold); }
small { font-size: var(--fs-xs); color: var(--muted); }

a {
  color: var(--action-deep);
  font-weight: var(--fw-bold);
  text-decoration: none;
}
a:hover { text-decoration: underline; text-underline-offset: 2px; }

hr {
  border: 0;
  border-top: var(--border) solid var(--line);
  margin: var(--sp-md) 0;
}

img, svg, video, canvas { display: block; max-width: 100%; }

/* form defaults - every input is 44px min, tokenised, no framework */
button, input, select, textarea { font: inherit; color: inherit; }
label {
  display: inline-block;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-bottom: var(--sp-2xs);
}
input, select, textarea {
  width: 100%;
  min-height: var(--touch);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--surface);
  color: var(--text);
  border: var(--border-2) solid var(--line);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--line-strong); }
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--action);
  outline-offset: 2px;
  border-color: var(--action);
}
textarea { min-height: 6rem; resize: vertical; }
input[type="checkbox"], input[type="radio"] {
  width: auto; min-height: 0; accent-color: var(--action);
}
button { cursor: pointer; border: 0; background: none; padding: 0; }
::placeholder { color: var(--faint); opacity: 1; }

/* tables - default styled, ready for admin/data density */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: var(--border) solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
}
th {
  text-align: left;
  font-size: var(--fs-2xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: var(--sp-sm) var(--sp-md);
  background: var(--bg);
  border-bottom: var(--border) solid var(--line);
  font-weight: var(--fw-bold);
}
td {
  padding: var(--sp-sm) var(--sp-md);
  border-bottom: var(--border) solid var(--line);
  vertical-align: top;
  font-size: var(--fs-sm);
}
tr:last-child td { border-bottom: 0; }

ul, ol { margin: 0; padding-left: 1.25rem; }
li + li { margin-top: var(--sp-2xs); }

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
}
pre { padding: var(--sp-md); overflow-x: auto; }

/* accessibility: reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
