/* AI Act Index — Design System */

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

:root {
  --eu-blue: #003399;
  --eu-blue-light: #0044cc;
  --text: #1A1A2E;
  --text-muted: #4B5563;
  --border: #E5E7EB;
  --surface: #F8FAFC;
  --white: #FFFFFF;

  --prohibited: #DC2626;
  --prohibited-bg: #FEF2F2;
  --high: #D97706;
  --high-bg: #FFFBEB;
  --limited: #CA8A04;
  --limited-bg: #FEFCE8;
  --minimal: #16A34A;
  --minimal-bg: #F0FDF4;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}

/* Typography */
h1 { font-size: 2.25rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.75rem; margin-top: 2rem; }
h3 { font-size: 1.125rem; font-weight: 600; line-height: 1.4; margin-bottom: 0.5rem; margin-top: 1.5rem; }
p { margin-bottom: 1rem; }
a { color: var(--eu-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.25rem; }
code { font-family: 'Courier New', monospace; font-size: 0.875em; background: var(--surface); padding: 0.1em 0.3em; border-radius: 3px; }

/* Layout */
.container { max-width: 860px; margin: 0 auto; padding: 0 1.5rem; }
.container--wide { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* Header */
.site-header {
  background: var(--eu-blue);
  color: var(--white);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid #002277;
}

.site-header .container--wide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header__brand {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  white-space: nowrap;
}

.site-header__brand:hover { text-decoration: none; opacity: 0.9; }

.site-header__disclaimer {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.75);
  text-align: center;
  line-height: 1.3;
}

.site-header__nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-header__nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.site-header__nav a:hover { color: var(--white); text-decoration: none; }

/* Hero */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
}

.hero__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eu-blue);
  margin-bottom: 0.75rem;
}

.hero__title { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }

.hero__intro {
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 0;
  line-height: 1.7;
}

.hero__updated {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  margin-bottom: 0;
  opacity: 0.75;
}

/* Main content */
.main-content { padding: 2.5rem 0 4rem; }

/* Risk badges */
.risk-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2em 0.6em;
  border-radius: 4px;
}

.risk-prohibited { background: var(--prohibited-bg); color: var(--prohibited); }
.risk-high       { background: var(--high-bg);       color: var(--high); }
.risk-limited    { background: var(--limited-bg);    color: var(--limited); }
.risk-minimal    { background: var(--minimal-bg);    color: var(--minimal); }

/* Risk cards grid */
.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.risk-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow 0.15s, transform 0.15s;
}

.risk-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-2px); text-decoration: none; }

.risk-card--prohibited { border-top: 4px solid var(--prohibited); }
.risk-card--high       { border-top: 4px solid var(--high); }
.risk-card--limited    { border-top: 4px solid var(--limited); }
.risk-card--minimal    { border-top: 4px solid var(--minimal); }

.risk-card__label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.risk-card--prohibited .risk-card__label { color: var(--prohibited); }
.risk-card--high       .risk-card__label { color: var(--high); }
.risk-card--limited    .risk-card__label { color: var(--limited); }
.risk-card--minimal    .risk-card__label { color: var(--minimal); }

.risk-card__title { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.risk-card__desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* Timeline strip */
.timeline-strip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.timeline-strip__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--eu-blue);
  margin-bottom: 1rem;
}

.timeline-dates {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.timeline-date {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--eu-blue);
  margin-bottom: 0.5rem;
}

.timeline-date__date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--eu-blue);
  font-family: 'Courier New', monospace;
}

.timeline-date__desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; }

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

thead { background: var(--eu-blue); color: var(--white); }
thead th { padding: 0.75rem 1rem; text-align: left; font-weight: 600; font-size: 0.8rem; letter-spacing: 0.03em; }
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:nth-child(even) { background: var(--surface); }
tbody td { padding: 0.75rem 1rem; vertical-align: top; }
tbody td:first-child { font-weight: 600; white-space: nowrap; }

/* Alert / callout */
.callout {
  border-left: 4px solid var(--eu-blue);
  background: #EFF6FF;
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

.callout--warning {
  border-left-color: var(--high);
  background: var(--high-bg);
}

.callout--danger {
  border-left-color: var(--prohibited);
  background: var(--prohibited-bg);
}

/* Section divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Page nav */
.page-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.page-nav a {
  font-size: 0.8rem;
  padding: 0.3em 0.75em;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--eu-blue);
  background: var(--white);
}

.page-nav a:hover { background: var(--surface); text-decoration: none; }

/* Definition list */
.def-list dt {
  font-weight: 700;
  margin-top: 1.25rem;
  font-size: 1rem;
  color: var(--eu-blue);
}

.def-list dd {
  margin-left: 0;
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.65;
  padding-left: 1rem;
  border-left: 3px solid var(--border);
  margin-top: 0.25rem;
}

/* Disclaimer banner */
.disclaimer-banner {
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding: 1rem 0;
  margin-top: 2rem;
  line-height: 1.5;
}

/* Article disclaimer (below content) */
.article-disclaimer {
  font-size: 0.8125rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-left: 4px solid var(--eu-blue);
  background: var(--surface);
  border-radius: 0 6px 6px 0;
  padding: 1rem 1.25rem;
  margin-top: 2.5rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 2rem 0;
  font-size: 0.8125rem;
  margin-top: 4rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.site-footer__brand {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.site-footer__nav-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}

.site-footer__nav a {
  display: block;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
}

.site-footer__nav a:hover { color: var(--white); text-decoration: none; }

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-footer__disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  max-width: 600px;
}

/* Contact form */
.contact-form {
  max-width: 560px;
}

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.6rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--eu-blue);
  box-shadow: 0 0 0 3px rgba(0,51,153,0.1);
}

.form-group textarea { min-height: 130px; resize: vertical; }

.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.btn--primary {
  background: var(--eu-blue);
  color: var(--white);
}

.btn--primary:hover { background: var(--eu-blue-light); transform: translateY(-1px); }

.form-success {
  display: none;
  background: var(--minimal-bg);
  border: 1px solid var(--minimal);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  color: #14532D;
  font-size: 0.9375rem;
  margin-top: 1rem;
}

/* Sector cards */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.sector-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}

.sector-card__icon { font-size: 1.5rem; margin-bottom: 0.5rem; }
.sector-card__title { font-size: 1rem; font-weight: 700; margin-bottom: 0.35rem; }
.sector-card__risk { margin-bottom: 0.5rem; }
.sector-card__desc { font-size: 0.875rem; color: var(--text-muted); margin: 0; line-height: 1.5; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.faq-item:first-child { padding-top: 0; }

.faq-item__q {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.faq-item__a {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
  h1 { font-size: 1.75rem; }
  .hero__title { font-size: 1.875rem; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-header .container--wide { flex-wrap: wrap; }
  .site-header__disclaimer { display: none; }
}
