:root {
  /* FLIK brand tokens — derived from flik.co.id */
  --bg: #121212;
  --surface: #1a1a1a;
  --border: #262626;
  /* Orange is primary accent — CTAs, links, hero, hover states */
  --accent: #ff7d50;
  --accent-dim: #ff7d501a;
  /* Purple is secondary accent — headings, code, HOF entry accent, nav indicator */
  --accent-secondary: #9546ff;
  --accent-secondary-dim: #9546ff1a;
  --text-primary: #ffffff;
  --text-muted: #737373;
  /* Severity badges — semantic colours, not brand tokens */
  --severity-critical: #FF4D4F;
  --severity-high: #FF7A45;
  --severity-medium: #FFC53D;
  --severity-low: #73D13D;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

/* Screen reader only */
.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;
}

/* ─── Navigation ─────────────────────────────────────────────────────────── */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(18, 18, 18, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: center;
}

/* All nav links — unified white text */
.site-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  padding: 0.25rem 0;
}

/* Orange on hover */
.site-nav a:hover {
  color: var(--accent);
}

/* Active/current page — orange color */
.site-nav a.active,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

/* Underline indicator — only on hover and active */
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after,
.site-nav a[aria-current="page"]::after {
  width: 100%;
}

/* ─── Main content ────────────────────────────────────────────────────────── */

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

#hero {
  text-align: center;
  padding: 3rem 1rem;
}

/* ASCII wordmark — orange, the primary brand colour */
#hero pre {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.75rem;
  line-height: 1.2;
  color: var(--accent);
  margin: 0 0 1.5rem 0;
  overflow-x: auto;
}

#hero p {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0;
}

.hero-prefix {
  color: var(--accent-secondary);
}

/* ─── Sections ────────────────────────────────────────────────────────────── */

section {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

/* Section headings — purple secondary accent */
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1rem 0;
  color: var(--accent-secondary);
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem 0;
  color: var(--text-primary);
}

p {
  margin: 0 0 1rem 0;
  color: var(--text-primary);
  line-height: 1.7;
}

p:last-child {
  margin-bottom: 0;
}

strong {
  color: var(--accent);
  font-weight: 600;
}

/* ─── Lists ───────────────────────────────────────────────────────────────── */

ul, ol {
  margin: 0 0 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-primary);
}

li {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

li:last-child {
  margin-bottom: 0;
}

/* ─── Links ───────────────────────────────────────────────────────────────── */

/* Orange for all inline links */
a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ─── Tables ──────────────────────────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--border);
}

th {
  background-color: var(--surface);
  color: var(--accent-secondary);
  font-weight: 600;
}

td {
  color: var(--text-primary);
}

/* Table code (scope URLs) — orange for consistency with Report section */
td code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8125rem;
  color: var(--accent);
  background-color: var(--accent-dim);
  padding: 0.1em 0.35em;
  border-radius: 0.2rem;
}

/* Other inline code */
li code, p code {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.8125rem;
  color: var(--accent);
  background-color: var(--accent-dim);
  padding: 0.1em 0.35em;
  border-radius: 0.2rem;
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1rem 0;
}

/* ─── Severity badges ─────────────────────────────────────────────────────── */

.severity-critical,
.severity-high,
.severity-medium,
.severity-low {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.severity-critical {
  background-color: var(--severity-critical);
  color: var(--bg);
}

.severity-high {
  background-color: var(--severity-high);
  color: var(--bg);
}

.severity-medium {
  background-color: var(--severity-medium);
  color: var(--bg);
}

.severity-low {
  background-color: var(--severity-low);
  color: var(--bg);
}

/* ─── Report section ──────────────────────────────────────────────────────── */

/* Email CTA — orange pill button */
#report .email-link {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0;
  color: var(--bg);
  background-color: var(--accent);
  padding: 0.625rem 1.5rem;
  border-radius: 60px;
  transition: opacity 0.2s ease;
  text-decoration: none;
}

#report .email-link:hover {
  opacity: 0.85;
  text-decoration: none;
}

#report .template-list {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-secondary);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1.25rem;
  margin: 1rem 0;
}

#report .template-list ol {
  margin: 0;
  padding-left: 1.25rem;
}

#report .template-list li {
  margin-bottom: 0.75rem;
}

#report .subject-line {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.75rem 1rem;
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: 0.5rem 0 1rem 0;
}

/* ─── Safe harbour blockquote ─────────────────────────────────────────────── */

/* Purple left border — secondary accent for legal/formal content */
blockquote {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background-color: var(--surface);
  border-left: 3px solid var(--accent-secondary);
  border-radius: 0 0.5rem 0.5rem 0;
}

blockquote p {
  margin: 0;
  color: var(--text-primary);
  font-style: italic;
}

/* ─── Hall of Fame ────────────────────────────────────────────────────────── */

#hof-header {
  text-align: center;
  padding: 2rem 1rem;
}

#hof-header h2 {
  margin-bottom: 0.5rem;
  /* inherits --accent-secondary (purple) from h2 rule */
}

#hof-header p {
  color: var(--text-primary);
}

#hof-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* HOF entry card — orange left border as primary identifier */
.hof-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 0.5rem 0.5rem 0;
  padding: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
}

.hof-item:last-child {
  margin-bottom: 0;
}

.hof-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.hof-alias {
  color: var(--text-primary);
  font-size: 0.875rem;
}

/* Date badge — purple secondary */
.hof-date {
  background-color: var(--accent-secondary-dim);
  color: var(--accent-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.hof-category {
  background-color: var(--border);
  color: var(--text-primary);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.hof-links {
  margin-left: auto;
  display: flex;
  gap: 0.75rem;
}

.hof-links a {
  font-size: 0.875rem;
  color: var(--text-primary);
}

/* Link hover — orange */
.hof-links a:hover {
  color: var(--accent);
}

/* ─── Empty state ─────────────────────────────────────────────────────────── */

.hof-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
}

.hof-empty p {
  margin: 0;
}

/* ─── Error state ─────────────────────────────────────────────────────────── */

.hof-error {
  text-align: center;
  padding: 2rem 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--severity-critical);
  border-radius: 0.5rem;
  color: var(--severity-critical);
}

/* ─── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.site-footer p {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin: 0;
}

/* Orange dot separator in footer */
.site-footer p::before {
  content: '';
}

/* ─── Tablet and up ───────────────────────────────────────────────────────── */

@media (min-width: 768px) {
  .site-nav {
    padding: 1rem 2rem;
    justify-content: flex-start;
    gap: 2rem;
  }

  .site-nav a {
    font-size: 0.9375rem;
  }

  main {
    padding: 0 2rem;
  }

  #hero {
    padding: 4rem 2rem;
  }

  #hero pre {
    font-size: 1rem;
  }

  #hero p {
    font-size: 1.5rem;
  }

  section {
    padding: 3rem 0;
  }

  h2 {
    font-size: 1.75rem;
  }

  .table-wrapper {
    margin: 1.5rem 0;
  }

  th, td {
    padding: 1rem;
  }

  .hof-item {
    padding: 1.5rem;
    flex-wrap: nowrap;
    align-items: center;
  }

  .hof-links {
    margin-left: auto;
  }
}
