/* Trust Right Rx LLC — trustrightrx.com
   Brand: #003d79 navy (structure, text, action) · #80b821 lime (emphasis only)
   Type:  Rubik (headings) · Manrope (body, labels) */

:root {
  color-scheme: light;

  --navy:       #003d79;
  --lime:       #80b821;

  --ink:        #12263a;
  --ink-soft:   #3d5266;
  --ground:     #ffffff;
  --ground-alt: #ffffff;
  --panel:      #ffffff;

  --accent:     #003d79;
  --accent-ink: #003d79;
  --accent-hover:#002a54;
  --accent-wash:#e8eff6;

  --lime-ink:   #4e7314;
  --lime-wash:  #f1f7e6;

  --rule:       #d3dde5;
  --rule-soft:  #e4ebf1;
  --muted:      #5f7386;

  --measure: 68ch;
  --gutter: clamp(1rem, 4vw, 3.5rem);

  --f-head: "Rubik", -apple-system, "Segoe UI", sans-serif;
  --f-body: "Manrope", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--accent-ink); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }

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

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Masthead ---------- */

.entity-strip {
  background: var(--navy);
  color: #dce8f4;
  font-family: var(--f-body);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-bottom: 3px solid var(--lime);
}

.entity-strip .wrap {
  display: flex;
  gap: 0.4rem 1.75rem;
  flex-wrap: wrap;
  padding-block: 0.6rem;
}

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--ground);
  position: sticky;
  top: 0;
  z-index: 20;
}

.masthead-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-block: 1rem;
}

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.wordmark strong {
  font-family: var(--f-head);
  font-size: 1.34rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
}

.wordmark span {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }

.nav a {
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  padding-block: 0.25rem;
  border-bottom: 3px solid transparent;
}

.nav a:hover { color: var(--accent-ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--lime);
  font-weight: 700;
}

/* ---------- Page head ---------- */

.pagehead {
  border-bottom: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
}

.eyebrow {
  font-family: var(--f-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime-ink);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--lime);
  flex-shrink: 0;
}

h1 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.05rem);
  line-height: 1.14;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin: 0 0 1.15rem;
  max-width: 22ch;
  color: var(--accent-ink);
}

.standfirst {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--ink-soft);
  max-width: var(--measure);
  margin: 0;
  line-height: 1.62;
}

/* ---------- Sections ---------- */

section { padding-block: clamp(2.5rem, 5vw, 4rem); }
section + section { border-top: 1px solid var(--rule-soft); }

h2 {
  font-family: var(--f-head);
  font-weight: 600;
  font-size: clamp(1.45rem, 3vw, 1.95rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0 0 1rem;
  max-width: 26ch;
  color: var(--accent-ink);
}

h3 {
  font-family: var(--f-head);
  font-weight: 500;
  font-size: 1.04rem;
  letter-spacing: -0.005em;
  margin: 0 0 0.5rem;
  color: var(--ink);
}

h2 a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--lime);
  text-underline-offset: 6px;
}
h2 a:hover { color: var(--accent-hover); text-decoration-color: var(--accent); }

p { max-width: var(--measure); }
section > .wrap > p:first-of-type { margin-top: 0; }

.lede { font-size: 1.08rem; color: var(--ink-soft); }

ul.plain { padding-left: 1.15rem; max-width: var(--measure); }
ul.plain li { margin-bottom: 0.55rem; }
ul.plain li::marker { color: var(--lime-ink); }

/* ---------- Disclosure blocks ---------- */

.disclosure {
  border: 1px solid var(--rule);
  border-left: 5px solid var(--lime);
  background: var(--panel);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  max-width: var(--measure);
}

.disclosure.critical {
  border-left-color: var(--navy);
  border-color: var(--rule);
  background: var(--accent-wash);
}

.disclosure h3 {
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime-ink);
  margin-bottom: 0.75rem;
}

.disclosure.critical h3 { color: var(--accent-ink); }
.disclosure p { max-width: none; }
.disclosure p:last-child { margin-bottom: 0; }

/* ---------- Record grid ---------- */

.record {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 0;
  background: var(--panel);
  border: 1px solid var(--rule);
  margin-top: 1.6rem;
}

.record > div {
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--rule);
  padding: 1.15rem 1.3rem;
}

.record .k {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.record .v {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

/* ---------- Numbered steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 1.85rem;
  counter-reset: step;
}

.step { border-top: 3px solid var(--lime); padding-top: 1.05rem; }

.step .n {
  counter-increment: step;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--lime-ink);
  display: block;
  margin-bottom: 0.55rem;
}

.step .n::before { content: "STEP " counter(step, decimal-leading-zero); }
.step p { font-size: 0.96rem; max-width: none; margin-bottom: 0; }

.step .when {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  margin-top: 0.75rem;
  display: block;
}

/* ---------- Tables ---------- */

.table-scroll { overflow-x: auto; margin-top: 1.6rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 480px;
}

caption {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 0.8rem;
}

th, td {
  text-align: left;
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: top;
}

thead th {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--lime);
}

td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* ---------- Columns ---------- */

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem 3rem;
  margin-top: 1.6rem;
}

.cols p { max-width: none; }

.do-dont { border-top: 3px solid var(--rule); padding-top: 1.05rem; }
.do-dont.yes { border-top-color: var(--lime); }
.do-dont.no { border-top-color: var(--navy); }

.do-dont h3 {
  font-family: var(--f-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.do-dont.yes h3 { color: var(--lime-ink); }
.do-dont.no h3 { color: var(--accent-ink); }

/* ---------- Buttons ---------- */

.cta-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.85rem; }

.btn {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--navy);
  background: var(--navy);
  color: #ffffff;
}

.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

.btn.ghost { background: transparent; color: var(--accent-ink); border-color: var(--accent); }
.btn.ghost:hover { background: var(--lime); border-color: var(--lime); color: #16250a; }

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

.site-foot {
  border-top: 4px solid var(--lime);
  background: var(--ground-alt);
  padding-block: clamp(2.5rem, 5vw, 3.5rem) 2rem;
  margin-top: 2rem;
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
}

.foot-grid h4 {
  font-family: var(--f-body);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem;
}

.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.foot-grid a { color: var(--ink-soft); text-decoration: none; }
.foot-grid a:hover { color: var(--accent-ink); text-decoration: underline; }

address {
  font-style: normal;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

.legal {
  border-top: 1px solid var(--rule);
  margin-top: 2.5rem;
  padding-top: 1.6rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 80ch;
}

.legal p { max-width: none; margin: 0 0 0.85rem; }
.legal p:last-child { margin-bottom: 0; }
.legal strong { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 560px) {
  .masthead { position: static; }
  .nav { gap: 0.9rem 1.15rem; }
  .nav a { font-size: 0.88rem; }
}
