/* Engineering documentation style - neutral, factual, readable */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: #2d2d2d;
  background-color: #fafafa;
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

h1 {
  font-size: 2.25rem;
  font-weight: 600;
  margin-bottom: 2rem;
  margin-top: 0;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  color: #1a1a1a;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h2:first-of-type {
  margin-top: 2rem;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #2d2d2d;
  line-height: 1.4;
}

p {
  margin-bottom: 1.25rem;
  max-width: 75ch;
  line-height: 1.7;
}

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

ul, ol {
  margin-left: 1.75rem;
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

ul:last-child,
ol:last-child {
  margin-bottom: 0;
}

li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  font-size: 0.9375rem;
  background-color: #ffffff;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e5e5e5;
}

th {
  font-weight: 600;
  background-color: #f5f5f5;
  color: #1a1a1a;
}

tbody tr:nth-child(even) {
  background-color: #fafafa;
}

tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

a {
  color: #4a6fa5;
  text-decoration: none;
  font-weight: 500;
}

a:hover {
  text-decoration: underline;
}

section {
  margin-bottom: 3rem;
}

/* Add subtle divider between regular sections, but not for special sections */
section:not(.refusal):not(.internal-links):not(:last-of-type) {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #e5e5e5;
}

section.refusal + section:not(.refusal):not(.internal-links),
section.internal-links {
  border-bottom: none;
  padding-bottom: 0;
}

.meta-info {
  font-size: 0.8125rem;
  color: #6b6b6b;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #e5e5e5;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.meta-info strong {
  font-weight: 500;
  color: #4a4a4a;
}

/* Definition section - light background panel */
section > h2:first-child + p {
  margin-top: 0;
}

/* Style the first section (definition) with light background */
body > section:first-of-type:not(.case-study) {
  background-color: #ffffff;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 2px;
  border-left: 2px solid #d0d0d0;
  border-bottom: 1px solid #e5e5e5;
}

.refusal {
  background-color: #f7f7f7;
  padding: 2rem;
  margin: 2.5rem 0;
  border-left: 3px solid #6b6b6b;
  border-radius: 2px;
  border-bottom: none;
}

.refusal h3 {
  margin-top: 0;
  color: #1a1a1a;
}

.refusal p {
  margin-bottom: 1rem;
}

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

.internal-links {
  margin-top: 4rem;
  padding: 2rem;
  padding-top: 2.5rem;
  border-top: 2px solid #e5e5e5;
  background-color: #ffffff;
  border-radius: 2px;
  border-bottom: none;
}

.internal-links h2 {
  font-size: 1.25rem;
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.internal-links ul {
  list-style: none;
  margin-left: 0;
}

.internal-links li {
  margin-bottom: 0.875rem;
  padding-left: 0;
}

.authority-note {
  font-size: 0.8125rem;
  color: #6b6b6b;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 2px solid #e5e5e5;
  line-height: 1.6;
}

.authority-note p {
  margin-bottom: 0;
  max-width: 100%;
}

.contact-reference {
  font-size: 0.8125rem;
  color: #6b6b6b;
  margin-top: 3rem;
  margin-bottom: 0;
  line-height: 1.6;
}

.contact-reference a {
  color: #4a6fa5;
  font-weight: 400;
}

/* Footer navigation - document style grid */
footer {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 2px solid #e5e5e5;
  font-size: 0.875rem;
  color: #6b6b6b;
  line-height: 1.7;
}

footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  align-items: start;
}

footer h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #4a4a4a;
  margin-top: 0;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

footer ul {
  list-style: none;
  margin-left: 0;
  margin-bottom: 0;
}

footer li {
  margin-bottom: 0.5rem;
}

footer a {
  color: #4a6fa5;
  font-weight: 400;
}

footer a:hover {
  text-decoration: underline;
}

footer p {
  margin-bottom: 0.75rem;
  max-width: 100%;
  line-height: 1.6;
}

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

/* Column-specific styling */
footer .footer-col-index {
  /* Site index - full list */
}

footer .footer-col-related {
  /* Related topics - contextual */
}

footer .footer-col-context {
  /* Context - narrative */
  max-width: 24ch;
}

footer .footer-col-context p {
  color: #6b6b6b;
  font-size: 0.8125rem;
}

footer .footer-col-org {
  /* Organisation */
}

footer .footer-col-org p {
  color: #6b6b6b;
  font-size: 0.8125rem;
}

@media (max-width: 768px) {
  body {
    padding: 2rem 1.5rem;
  }
  
  h1 {
    font-size: 1.875rem;
  }
  
  h2 {
    font-size: 1.375rem;
    margin-top: 2.5rem;
  }

  h2:first-of-type {
    margin-top: 1.5rem;
  }

  section:first-of-type {
    padding: 1.5rem;
  }

  .refusal,
  .internal-links {
    padding: 1.5rem;
  }

  footer {
    margin-top: 4rem;
    padding-top: 2rem;
    font-size: 0.8125rem;
  }

  footer .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  footer .footer-col-context {
    max-width: 100%;
  }

  footer h3 {
    font-size: 0.8125rem;
    margin-top: 0;
  }
}

@media (max-width: 480px) {
  footer .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border-top: 2px solid #e5e5e5;
  padding: 1.5rem 2rem;
  font-size: 0.875rem;
  color: #2d2d2d;
  line-height: 1.6;
  z-index: 1000;
  display: none;
  max-width: 900px;
  margin: 0 auto;
}

.cookie-banner.show {
  display: block;
}

.cookie-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-banner-text {
  flex: 1;
  max-width: 65ch;
}

.cookie-banner-text a {
  color: #4a6fa5;
  text-decoration: underline;
  font-weight: 500;
}

.cookie-banner-text a:hover {
  color: #3d5a8a;
}

.cookie-banner-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-banner button {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #d0d0d0;
  background-color: #ffffff;
  color: #2d2d2d;
  cursor: pointer;
  border-radius: 2px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.cookie-banner button:hover {
  background-color: #f5f5f5;
}

.cookie-banner button.accept {
  background-color: #4a6fa5;
  color: #ffffff;
  border-color: #4a6fa5;
}

.cookie-banner button.accept:hover {
  background-color: #3d5a8a;
}

@media (max-width: 768px) {
  .cookie-banner {
    padding: 1.25rem 1.5rem;
  }

  .cookie-banner-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner button {
    flex: 1;
  }
}
