/* Tier 2 — base components. Depends on tokens.css. */

/* reset + typography (from V7) */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 18px; font-weight: 500;
  line-height: 29px; color: var(--body); background: var(--white); -webkit-font-smoothing: antialiased; }
h1, .h1 { font-size: 40px; font-weight: 700; line-height: 1.2; color: var(--heading); margin: 0 0 16px; }
h2, .h2 { font-size: 31px; font-weight: 700; line-height: 1.3; color: var(--heading); margin: 0 0 14px; }
h3, .h3 { font-size: 24px; font-weight: 600; line-height: 1.35; color: var(--heading); margin: 0 0 12px; }
h4, .h4 { font-size: 19px; font-weight: 600; line-height: 1.5; color: var(--heading); margin: 0 0 10px; }
p { margin: 0 0 16px; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

/* container + grid */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.row > [class*="col-"] { padding: 0 15px; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-5 { flex: 0 0 41.6667%; max-width: 41.6667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.3333%; max-width: 58.3333%; }
.col-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
section { padding: var(--section-py) 0; position: relative; }
/* When a <section> is itself the .container, .container's `padding:0 24px`
   shorthand would zero the vertical padding — restore it explicitly. */
section.container { padding-top: 44px; padding-bottom: 44px; }
.bg-light { background: var(--light-1); }

/* accessibility */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 16px; z-index: 2000; }
.skip-link:focus { left: 8px; top: 8px; color: #fff; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px;
  font-family: var(--font); font-size: 16px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--r-pill); cursor: pointer; transition: var(--transition); }
.btn-primary { background: var(--secondary); color: #fff; border-color: var(--secondary); }
.btn-primary:hover { color: #fff; box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary);
  padding: 9px 20px; border-radius: 24px; font-size: 16px; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-text { background: none; border: none; color: var(--primary); font-weight: 600; padding: 0; }
.btn-blue { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-blue:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-lg { padding: 12px 26px; font-size: 17px; }

/* eyebrow + badges */
.eyebrow { display: inline-block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--secondary); font-weight: 700; }
.badge { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); }
.badge.blue { background: var(--primary-soft); color: var(--primary); }
.badge.navy { background: var(--navy); color: #fff; }
.badge.green { background: #e6f6ea; color: var(--success); }
.badge.warn { background: var(--secondary-soft); color: var(--secondary-dark); }

/* section head */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 26px; }
.section-title { font-size: 30px; font-weight: 700; margin: 6px 0 8px; color: var(--heading); }
.accent { color: var(--primary); }
.accent-2 { color: var(--secondary); }
.section-lead { color: var(--body); }

/* card */
.card { border: 1px solid var(--light-3); border-radius: var(--r-md); padding: 16px; background: #fff;
  transition: var(--transition); }
/* Equal-height only when the card IS a grid/row column — stacked cards in a
   plain container keep their natural height (was: blanket height:100%, which
   stretched stacked sidebar cards and overflowed the footer). */
.row > [class*="col-"] > .card { height: 100%; }
.card:hover { box-shadow: var(--shadow-soft); }
/* Lift only cards that are actually clickable (links/buttons). */
a.card:hover, .card.is-link:hover { transform: translateY(-3px); }
.icon-holder { width: 42px; height: 42px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 12px; }

/* forms */
.field { margin-bottom: 12px; }
label.f { font-size: 17px; font-weight: 600; display: block; margin-bottom: 5px; color: var(--heading); }
.inp { width: 100%; padding: 10px 12px; border: 1px solid #ced4da; border-radius: var(--r-sm);
  font-family: inherit; font-size: 17px; transition: border-color .15s, box-shadow .15s; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.inp.is-invalid { border-color: var(--danger); }
.err { color: var(--danger); font-size: 13px; margin-top: 4px; }

/* breadcrumb */
.crumb { font-size: 16px; color: var(--body); }
.crumb a { color: var(--primary); }
.crumb i { font-size: 11.5px; margin: 0 7px; color: var(--body-soft); }

/* pagination */
.pag { display: flex; gap: 6px; justify-content: center; margin-top: 32px; }
.pag a { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--light-3); border-radius: var(--r-sm); color: var(--heading); font-size: 16.5px; }
.pag a:hover { border-color: var(--primary); color: var(--primary); }
.pag a.on { background: var(--primary); color: #fff; border-color: var(--primary); }

/* table */
table.t { border-collapse: collapse; width: 100%; font-size: 16.5px; }
table.t th { background: var(--navy); color: #fff; padding: 9px 12px; text-align: left; font-weight: 600; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--light-3); }
table.t tr:nth-child(even) td { background: var(--light-1); }
.table-scroll { overflow-x: auto; }

/* accordion */
.acc { border: 1px solid var(--light-3); border-radius: var(--r-md); overflow: hidden; }
.acc-item + .acc-item { border-top: 1px solid var(--light-3); }
.acc-q { padding: 13px 16px; font-weight: 600; color: var(--heading); display: flex;
  justify-content: space-between; align-items: center; cursor: pointer; background: none; border: none;
  width: 100%; text-align: left; font-family: inherit; font-size: 16px; }
.acc-q i { color: var(--primary); transition: transform .3s; }
.acc-item.open .acc-q i { transform: rotate(45deg); }
.acc-a { padding: 0 16px; max-height: 0; overflow: hidden; color: var(--body); transition: max-height .3s, padding .3s; }
.acc-item.open .acc-a { padding: 0 16px 14px; max-height: 500px; }

/* note / info callouts */
.note-box { border-left: 4px solid var(--secondary); background: var(--secondary-soft);
  padding: 10px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--secondary-dark); font-size: 16.5px; }
.info-box { border-left: 4px solid var(--primary); background: var(--primary-soft);
  padding: 10px 14px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--primary-dark); font-size: 16.5px; }

/* respect users who prefer reduced motion (hero float/ping/fade, hover lifts…) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}
