/* ==========================================================================
   AuthorityLinks.net — Base design system
   Original visual identity. Do not reuse third-party assets.
   ========================================================================== */

:root {
  /* Brand palette — deep navy ink, teal authority, coral action */
  --ink: #0a1a2f;
  --ink-2: #12263f;
  --muted: #5b6b72;
  --muted-2: #7c8b91;

  --brand: #0e7c6b;
  --brand-700: #0a6153;
  --brand-600: #0b6b5c;
  --brand-500: #12907c;
  --brand-100: #d6efe9;
  --brand-050: #e9f6f3;

  --accent: #d0451a;
  --accent-600: #a83a12;
  --accent-100: #ffe4da;

  --gold: #e8a33d;
  --gold-100: #fdf1dc;

  --success: #0e9f6e;
  --success-100: #d9f5e9;
  --danger: #d64545;
  --danger-100: #fbe3e3;

  --bg: #f4f8f8;
  --bg-2: #eef4f4;
  --surface: #ffffff;
  --surface-2: #f7fafa;
  --border: #dbe6e6;
  --border-strong: #c4d4d4;

  --shadow-xs: 0 1px 2px rgba(10, 26, 47, .06);
  --shadow-sm: 0 2px 8px rgba(10, 26, 47, .07);
  --shadow-md: 0 10px 30px -12px rgba(10, 26, 47, .22);
  --shadow-lg: 0 24px 60px -24px rgba(10, 26, 47, .30);

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --radius-pill: 999px;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --container: 1200px;
  --container-wide: 1320px;
  --header-h: 72px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
ul, ol { padding-left: 1.15em; }
:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 1.2rem + 2.1vw, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.7rem); }
h4 { font-size: 1.18rem; }
p { text-wrap: pretty; }
.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.28rem); color: var(--muted); line-height: 1.6; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-600);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent); border-radius: 2px; }
.mono { font-family: var(--font-mono); }
.text-muted { color: var(--muted); }
.text-brand { color: var(--brand-600); }
.text-accent { color: var(--accent-600); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
strong, b { font-weight: 700; }
mark { background: var(--gold-100); color: inherit; padding: 0 .2em; border-radius: 4px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 22px; }
.container-wide { width: 100%; max-width: var(--container-wide); margin-inline: auto; padding-inline: 22px; }
.section { padding-block: clamp(3.2rem, 2rem + 5vw, 6rem); }
.section-tight { padding-block: clamp(2.2rem, 1.6rem + 3vw, 3.6rem); }
.section-head { max-width: 760px; margin-bottom: 2.4rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { margin-top: .7rem; }
.section-head p { margin-top: .9rem; }
.stack > * + * { margin-top: 1rem; }
.grid { display: grid; gap: 1.4rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap-sm { gap: .6rem; } .gap { gap: 1rem; } .gap-lg { gap: 1.6rem; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; } .mt-5 { margin-top: 3rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 10px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display);
  font-weight: 600; font-size: .98rem; letter-spacing: -.01em;
  padding: .82rem 1.4rem; border-radius: var(--radius-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1.5px solid transparent;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
  white-space: nowrap; line-height: 1.1;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }
.btn-accent { --btn-bg: var(--accent); }
.btn-accent:hover { --btn-bg: var(--accent-600); }
.btn-ink { --btn-bg: var(--ink); }
.btn-ink:hover { --btn-bg: var(--ink-2); }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { --btn-bg: var(--surface); border-color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-light { --btn-bg: #fff; --btn-fg: var(--ink); }
.btn-light:hover { --btn-bg: var(--brand-050); }
.btn-outline-light { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { --btn-bg: rgba(255,255,255,.12); }
.btn-sm { padding: .58rem 1rem; font-size: .88rem; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link-arrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 600; color: var(--brand-600);
  transition: gap .18s var(--ease), color .18s var(--ease);
}
.link-arrow:hover { gap: .7rem; color: var(--brand-700); }
.link-arrow::after { content: "→"; }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .6rem; border-radius: var(--radius-pill);
  background: var(--brand-050); color: var(--brand-700);
  border: 1px solid var(--brand-100);
}
.badge-accent { background: var(--accent-100); color: var(--accent-600); border-color: #ffd0c2; }
.badge-gold { background: var(--gold-100); color: #a86a12; border-color: #f3ddb4; }
.badge-ink { background: var(--ink); color: #fff; border-color: var(--ink); }
.badge-soft { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.badge-success { background: var(--success-100); color: #0a6b4a; border-color: #b6e6d2; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .85rem; border-radius: var(--radius-pill);
  background: var(--surface); border: 1px solid var(--border);
  font-size: .84rem; font-weight: 500; color: var(--muted);
}
.pill svg { width: 15px; height: 15px; color: var(--brand-600); }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.card-flat { box-shadow: none; }

/* ---------- Forms ---------- */
.field { display: block; margin-bottom: 1.1rem; }
.field > label, .label {
  display: block; font-weight: 600; font-size: .9rem; margin-bottom: .45rem;
  font-family: var(--font-display);
}
.input, .select, .textarea {
  width: 100%; padding: .8rem .95rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--surface);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
  font-size: .96rem;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand-500);
  box-shadow: 0 0 0 4px var(--brand-050);
}
.textarea { min-height: 130px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235b6b72' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }
.hint { font-size: .82rem; color: var(--muted-2); margin-top: .35rem; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.check input { margin-top: .25rem; width: 17px; height: 17px; accent-color: var(--brand); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
th { font-family: var(--font-display); font-weight: 600; background: var(--surface-2); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

/* ---------- Utility surfaces ---------- */
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.divider { height: 1px; background: var(--border); border: 0; margin-block: 2rem; }
.note {
  border-left: 3px solid var(--brand); background: var(--brand-050);
  padding: 1rem 1.2rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .94rem; color: var(--ink-2);
  display: flex; gap: .65rem; align-items: flex-start;
}
.note > svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: .18rem; color: var(--brand-600); }
.note-accent { border-color: var(--accent); background: var(--accent-100); }

/* ---------- Touch target sizing (WCAG 2.5.5 / mobile a11y) ---------- */
@media (pointer: coarse) {
  .btn, .icon-btn, .nav-link, .add-btn, .float-btn, .chip, .tab { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .nav-link { padding-block: .7rem; }
}
