/* Tirzepatide Legit — Swiss Design Grafico
 * Strict 12-col grid, flush-left ragged-right type, 4-color discipline
 * white / near-black / signal red / ultramarine blue + grays
 */

:root {
  --primary:     #D8262C;
  --primary-50:  #FCEAEB;
  --primary-900: #7A1418;
  --secondary:   #0E2C7A;
  --accent:      #0E2C7A;
  --neutral-50:  #FFFFFF;
  --neutral-100: #F2F2F2;
  --neutral-200: #E5E5E5;
  --neutral-300: #CFCFCF;
  --neutral-500: #7A7A7A;
  --neutral-700: #3D3D3D;
  --neutral-900: #0F0F0F;
  --bg:          #FFFFFF;
  --surface:     #FFFFFF;
  --surface-alt: #F2F2F2;
  --text:        #0F0F0F;
  --text-muted:  #5A5A5A;
  --success:     #1F6E3A;
  --warning:     #B05A00;
  --danger:      #A51721;
  --verified:    #0E2C7A;
  --unverified:  #D8262C;

  --font-display: 'Inter Tight', 'Helvetica Neue', Helvetica, 'Akzidenz-Grotesk', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', Consolas, monospace;

  --max-width: 78rem;
  --container-px: clamp(1.25rem, 3vw, 2.5rem);
  --gutter: 1.5rem;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* Base typography */
html {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
body {
  min-height: 100vh;
  font-feature-settings: "ss01" on, "cv11" on, "tnum" off;
  text-rendering: optimizeLegibility;
}

p { max-width: 62ch; margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.12;
  color: var(--text);
}
h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 6vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 0.98;
  text-wrap: balance;
  margin: 0 0 1.5rem;
}
h2 {
  font-size: clamp(1.625rem, 3.5vw, 2.375rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
h4 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 0.5rem;
}

small, .small { font-size: 0.8125rem; }
.micro { font-size: 0.6875rem; }

.mono { font-family: var(--font-mono); }
code, .code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 0.05rem 0.25rem;
  border-radius: 0;
}
em { font-style: italic; }
strong { font-weight: 700; }

/* Links */
a {
  color: var(--text);
  border-bottom: 1px solid var(--neutral-300);
  transition: border-color 120ms ease-out, color 120ms ease-out;
}
a:hover { border-bottom-color: var(--primary); color: var(--primary); }
a:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 2px;
}

/* Container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

/* Grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}
.col-7  { grid-column: span 12; }
.col-8  { grid-column: span 12; }
.col-5  { grid-column: span 12; }
.col-12 { grid-column: span 12; }
@media (min-width: 768px) {
  .col-7  { grid-column: span 7; }
  .col-8  { grid-column: span 8; }
  .col-5  { grid-column: span 5; }
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--neutral-900); color: var(--neutral-50);
  padding: 0.5rem 0.75rem; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ===== Header — Swiss poster mast =====
   Thin 1px rule + 8px red square + flush-left wordmark + flush-right numeric-prefix nav
*/
.site-header {
  background: var(--bg);
  border-top: 1px solid var(--neutral-900);
  border-bottom: 1px solid var(--neutral-900);
}
.site-header .container {
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border-bottom: 0;
}
.brand-mark:hover { color: inherit; }
.brand-square {
  display: inline-block;
  width: 0.625rem;
  height: 0.625rem;
  background: var(--primary);
}
.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
.brand-wordmark .accent { color: var(--primary); }

.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}
.site-nav a {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  border-bottom: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}
.site-nav a .nav-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0;
}
.site-nav a[aria-current="page"] { color: var(--primary); }
.site-nav a[aria-current="page"] .nav-num { color: var(--primary); }
.site-nav a:hover { color: var(--primary); }

.nav-toggle {
  display: none;
  border: 1.5px solid var(--neutral-900);
  background: transparent;
  padding: 0.375rem 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--neutral-900);
  border-radius: 0;
  margin-left: auto;
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .site-nav { display: none; width: 100%; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.5rem; padding-top: 0.5rem; align-items: flex-end; }
}

/* ===== Main / hero ===== */
main { padding-bottom: 4rem; }

.hero {
  padding-top: clamp(2rem, 5vw, 4rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--neutral-900);
}
.hero .grid-12 { align-items: flex-start; }
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  border-top: 1px solid var(--neutral-900);
  padding-top: 0.625rem;
  display: inline-block;
}
.hero h1 { margin-bottom: 1.25rem; }
.subheadline {
  font-size: 1.125rem;
  line-height: 1.45;
  color: var(--neutral-700);
  max-width: 56ch;
  margin: 0 0 1.75rem;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 0.875rem; }

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 0.875rem 1.5rem;
  border-radius: 0;
  border: 0;
  cursor: pointer;
  transition: background-color 120ms ease-out, color 120ms ease-out, border-color 120ms ease-out;
  text-decoration: none;
  line-height: 1.2;
}
.btn-primary {
  background: var(--primary);
  color: var(--neutral-50);
  border-bottom: 0;
}
.btn-primary:hover { background: var(--primary-900); color: var(--neutral-50); border-bottom-color: transparent; }
.btn-secondary {
  background: transparent;
  color: var(--neutral-900);
  border: 1.5px solid var(--neutral-900);
  padding: calc(0.875rem - 1.5px) calc(1.5rem - 1.5px);
  border-bottom: 1.5px solid var(--neutral-900);
}
.btn-secondary:hover { background: var(--surface-alt); color: var(--neutral-900); }

/* Hero figure / verification stack */
.hero-figure {
  margin: 0;
  border: 1px solid var(--neutral-900);
  background: var(--surface);
  position: relative;
}
.hero-figure img { width: 100%; height: auto; display: block; }
.hero-figure .corner-notch {
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--primary);
  display: block;
}

.verify-stack {
  border: 1px solid var(--neutral-900);
  background: var(--surface);
  padding: 1.25rem;
  position: relative;
}
.verify-stack .corner-notch {
  position: absolute;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--primary);
}
.verify-stack .verify-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.875rem;
}
.verify-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--neutral-300);
}
.verify-row:last-child { border-bottom: 0; padding-bottom: 0; }
.verify-row .verify-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neutral-700);
}
.verify-row .verify-value {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text);
  flex: 1;
  text-align: right;
}
.verify-row .verify-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.verify-row .verify-status .sq {
  display: inline-block;
  width: 10px; height: 10px;
}
.verify-row .verify-status .sq.verified { background: var(--verified); }
.verify-row .verify-status .sq.flag { background: var(--primary); }
.verify-row .verify-status .sq.check { background: var(--neutral-500); }
.verify-row .verify-status .status-label {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neutral-700);
}

/* ===== Sections ===== */
section.content-section,
article > section {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--neutral-900);
}
article > section:last-of-type { border-bottom: 0; }

article > section .grid-12 { align-items: flex-start; }
article > section h2 { margin-bottom: 1.25rem; }

.section-body { grid-column: span 12; }
@media (min-width: 768px) {
  .section-body { grid-column: span 8; }
  .section-aside { grid-column: 9 / span 4; }
}

.section-body p { margin-bottom: 1rem; }
.section-body ul,
.section-body ol {
  margin: 0 0 1.25rem 0;
  padding-left: 0;
}
.section-body ul li,
.section-body ol li {
  padding: 0.5rem 0;
  padding-left: 2.25rem;
  border-bottom: 1px solid var(--neutral-200);
  position: relative;
}
.section-body ol { counter-reset: numlist; }
.section-body ol li::before {
  counter-increment: numlist;
  content: counter(numlist, decimal-leading-zero) ".";
  position: absolute;
  left: 0;
  top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
}
.section-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  top: 0.5rem;
  font-family: var(--font-mono);
  color: var(--primary);
}
.section-body ul li:last-child,
.section-body ol li:last-child { border-bottom: 0; }

/* Inline citation markers */
sup.citation { font-size: 0.65em; line-height: 1; vertical-align: super; }
sup.citation a {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--primary);
  border-bottom: 0;
  padding: 0 0.05rem;
}
sup.citation a:hover { color: var(--primary-900); background: var(--primary-50); }

/* Inline code */
.section-body em {
  font-style: italic;
  color: var(--text);
}

/* ===== Callouts ===== */
.callout {
  padding: 1rem 1rem 1rem 1.25rem;
  background: var(--surface);
  margin: 1.25rem 0;
  position: relative;
  border-left: 1.5px solid var(--neutral-900);
}
.callout .eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.6875rem;
  border-top: 0;
  padding-top: 0;
  display: inline-block;
}
.callout .eyebrow.red { color: var(--primary); }
.callout .eyebrow.blue { color: var(--verified); }
.callout p { margin: 0; }

.callout-verified { border-left-color: var(--verified); }
.callout-verified .eyebrow { color: var(--verified); }

.callout-warning { border-left-color: var(--primary); }
.callout-warning .eyebrow { color: var(--primary); }

.callout-note { border-left-color: var(--neutral-900); background: var(--surface-alt); }
.callout-note .eyebrow { color: var(--neutral-900); }

.callout-fda {
  border: 1px solid var(--neutral-900);
  border-left: 1px solid var(--neutral-900);
  border-top: 3px solid var(--primary);
  background: var(--surface-alt);
  padding: 1rem 1.25rem;
}
.callout-fda .eyebrow { color: var(--primary); }

/* Card */
.card {
  border: 1px solid var(--neutral-900);
  background: var(--surface);
  padding: 1.5rem;
  position: relative;
}
.card .corner-notch {
  position: absolute;
  top: 0; left: 0;
  width: 8px; height: 8px;
  background: var(--primary);
}
.card .card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.5rem;
}
.card h3 { margin: 0 0 0.625rem; }
.card p { margin: 0 0 0.5rem; }
.card p:last-child { margin-bottom: 0; }

/* Card grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gutter);
  margin: 1.5rem 0 0;
}

/* Tags */
.tag {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--neutral-900);
  padding: 0.2rem 0.5rem;
  border-radius: 0;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  background: var(--surface);
  color: var(--text);
  line-height: 1.2;
}
.tag-fda { background: var(--primary); color: var(--neutral-50); border-color: var(--primary); }
.tag-compounded { background: var(--surface); color: var(--primary); border-color: var(--primary); }
.tag-research { background: var(--surface); color: var(--neutral-900); border-color: var(--neutral-900); }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.9375rem;
}
table th {
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0;
  padding: 0.75rem 0.75rem 0.625rem 0;
  border-bottom: 1px solid var(--neutral-900);
  color: var(--text);
  vertical-align: bottom;
}
table td {
  padding: 0.75rem 0.75rem 0.75rem 0;
  border-bottom: 1px solid var(--neutral-300);
  vertical-align: top;
  color: var(--text);
}
table tr:last-child td { border-bottom: 0; }
table td.num, table th.num { font-variant-numeric: tabular-nums; }
table td.mono, table th.mono { font-family: var(--font-mono); font-size: 0.8125rem; }

/* DataTables overrides */
.dt-container {
  font-family: var(--font-body);
  font-size: 0.9375rem;
}
.dt-container .dt-search input,
.dt-container .dt-length select {
  border: 1.5px solid var(--neutral-900);
  border-radius: 0;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-body);
  background: var(--surface);
  color: var(--text);
}
.dt-container .dt-paging .dt-paging-button {
  border-radius: 0 !important;
  border: 1px solid var(--neutral-300) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem !important;
}
.dt-container .dt-paging .dt-paging-button.current {
  background: var(--neutral-900) !important;
  color: var(--neutral-50) !important;
  border-color: var(--neutral-900) !important;
}
.dt-container .dt-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
table.dataTable thead th {
  border-bottom: 1px solid var(--neutral-900) !important;
  font-family: var(--font-body);
  font-weight: 700 !important;
}
table.dataTable.no-footer { border-bottom: 0 !important; }
table.dataTable tbody td { border-bottom: 1px solid var(--neutral-300) !important; }

/* Figures */
figure.section-figure {
  margin: 1.5rem 0;
  border: 1px solid var(--neutral-900);
  background: var(--surface);
  padding: 0;
  position: relative;
}
figure.section-figure img { display: block; width: 100%; height: auto; }
figure.section-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--neutral-300);
}

/* References list */
.references-list {
  margin: 0;
  padding: 0;
  counter-reset: refs;
}
.references-list li {
  padding: 1rem 0 1rem 3rem;
  position: relative;
  border-bottom: 1px solid var(--neutral-300);
  font-size: 0.9375rem;
  line-height: 1.55;
  list-style: none;
}
.references-list li::before {
  counter-increment: refs;
  content: counter(refs, decimal-leading-zero) ".";
  position: absolute;
  left: 0;
  top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
}
.references-list a {
  color: var(--secondary);
  border-bottom: 1px solid var(--neutral-300);
}
.references-list a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.references-list .ref-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
}

/* Anchor target highlight */
:target { background: var(--primary-50); outline: 2px solid var(--primary); outline-offset: 4px; }

/* ===== Footer ===== */
.site-footer {
  background: var(--neutral-900);
  color: var(--neutral-50);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  border-top: 3px solid var(--primary);
}
.site-footer .container { display: grid; gap: 1.5rem; }
.site-footer .footer-wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--neutral-50);
}
.site-footer .footer-tagline {
  font-size: 0.9375rem;
  color: var(--neutral-300);
  max-width: 56ch;
}
.site-footer .footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.site-footer .footer-nav a {
  color: var(--neutral-50);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  border-bottom: 1px solid transparent;
}
.site-footer .footer-nav a:hover { border-bottom-color: var(--primary); color: var(--neutral-50); }
.site-footer .disclaimer,
.site-footer .copyright,
.site-footer .colophon {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--neutral-300);
  line-height: 1.55;
  max-width: 76ch;
}
.site-footer .disclaimer { color: var(--neutral-50); }
.site-footer hr.footer-rule {
  border: 0;
  border-top: 1px solid var(--neutral-700);
  margin: 0.5rem 0;
}

/* Tippy.js light-border theme tweak */
.tippy-box[data-theme~="light-border"] {
  background: var(--neutral-50);
  color: var(--text);
  border: 1px solid var(--neutral-900);
  border-radius: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
}
.tippy-box[data-theme~="light-border"] .tippy-arrow { color: var(--neutral-50); }

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

/* Print */
@media print {
  .site-header, .site-footer, .cta-row, .nav-toggle { display: none; }
  a { color: black; }
}

/* Form (contact) */
form.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
  margin: 1.5rem 0 0;
}
form.contact-form label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
form.contact-form input,
form.contact-form textarea {
  font: inherit;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--neutral-900);
  border-radius: 0;
  padding: 0.625rem 0.75rem;
  width: 100%;
}
form.contact-form textarea { min-height: 8rem; resize: vertical; }
form.contact-form button { justify-self: start; }
form.contact-form .form-note {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
