@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,700;1,400&display=swap');

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  background-color: #1e2127;
  background-image: url('/assets/background.jpeg');
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  color: #31363b;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

main.container {
  flex-grow: 1;
  min-width: 0;
}

nav {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 1rem 0;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a.active {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

nav a {
  color: #31363b;
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: bold;
}

nav a.brand {
  font-size: 1.25rem;
  margin-left: 0;
}

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

.nav-links a img {
  height: 24px;
  vertical-align: middle;
}

h1 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.title-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  row-gap: 0.25rem;
  margin-bottom: 1rem;
}

.title-header>h1 {
  margin: 0 1rem 0 0;
}

.org-name {
  color: #50555a;
  margin-left: auto;
}

.subtitle {
  font-style: italic;
  margin-bottom: 1.5rem;
}

main.container section,
.content {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin-top: 2rem;
}

.cta-container {
  text-align: center;
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.code-example {
  background-color: #31363b;
  color: #e3e6e8;
  padding: 1.5rem;
  border-radius: 0;
  margin-top: 1.5rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.code-example p {
  margin: 0.5rem 0;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background-color: #f8f9fa;
  padding: 1.5rem;
  border-radius: 0;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card h3 {
  margin-top: 0;
}

.card .card-subtitle {
  font-size: 0.9em;
  font-style: italic;
  color: #50555a;
  margin-top: -0.75rem;
  margin-bottom: 1rem;
}

.card .card-subtitle .glyph {
  white-space: nowrap;
  display: inline-block;
}

hr {
  border: 0;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

code {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  border-radius: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

ul,
ol {
  padding-left: 2rem;
}

h2,
h3,
h4,
h5,
h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
  color: #1e2127;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

blockquote {
  color: #50555a;
  margin: 1em 0;
  padding-left: 1.5em;
  border-left: 0.25em solid #e3e6e8;
}

pre {
  display: block;
  padding: 1rem;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-all;
  word-wrap: break-word;
  white-space: pre-wrap;
  background-color: #f0f2f4;
  border: 1px solid #e3e6e8;
  border-radius: 0;
}

pre code {
  padding: 0;
  font-size: 100%;
  color: inherit;
  background-color: transparent;
  border-radius: 0;
}

table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th,
td {
  padding: 0.75rem;
  border: 1px solid #e3e6e8;
  text-align: left;
  overflow-wrap: break-word;
}

th {
  font-weight: bold;
  background-color: #f0f2f4;
}

.license-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.license-spacer td {
  border: none;
  padding: 0.25rem;
}

.license-intent {
  font-size: 0.9em;
  font-style: italic;
  color: #50555a;
}

.protocol-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.protocol-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  font-size: 1.25rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: #1e2127;
}

/* Protocol Switcher Styles */
.protocol-switcher {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid #e3e6e8;
  margin-bottom: 1.5rem;
}

.protocol-switcher a {
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 0;
  background-color: transparent;
  cursor: pointer;
  font-weight: bold;
  color: #50555a;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: background-color 0.2s, color 0.2s;
}

.protocol-switcher a:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: #31363b;
}

.protocol-switcher a.active {
  background-color: rgba(255, 255, 255, 0.9);
  color: #31363b;
  text-decoration: none;
}

/* General link styling for content areas */
.content p a,
section p a,
.md-content a {
  color: inherit;
  /* This makes the link inherit the color of its parent text */
  text-decoration: underline;
  text-underline-offset: 2px;
  /* A little breathing room */
  transition: opacity 0.2s;
}

.content p a:hover,
section p a:hover,
.md-content a:hover {
  opacity: 0.7;
  /* A subtle fade on hover */
}

.md-content {
  color: #1e2127;
}

/* Generic Button Styles */
.button {
  background-color: #50555a;
  color: white;
  border: 2px solid transparent;
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.button:hover {
  background-color: #31363b;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
}

.button.button-secondary {
  background-color: white;
  color: #31363b;
  border-color: transparent;
}

.button.button-secondary:hover {
  background-color: #f0f2f4;
  color: #31363b;
  border-color: transparent;
}


.import-form {
  display: flex;
  flex-direction: column;
}

.import-form label {
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #1e2127;
}

.import-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #e3e6e8;
  border-radius: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  resize: vertical;
  box-sizing: border-box;
  background-color: #f8f9fa;
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.import-form textarea:focus {
  outline: none;
  border-color: #50555a;
  box-shadow: 0 0 0 3px rgba(74, 85, 104, 0.2);
}

.import-form button,
.success-message a {
  background-color: #50555a;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
  align-self: center;
  text-decoration: none;
  display: inline-block;
}

.import-form button:hover,
.success-message a:hover {
  background-color: #31363b;
}

.success-message,
.error-message {
  padding: 1rem;
  border-radius: 0;
  margin: 1rem 0;
  border: 1px solid transparent;
}

.success-message {
  background-color: #f0f2f4;
  border-color: #e3e6e8;
  color: #31363b;
  text-align: center;
}

.error-message {
  background-color: #c53030;
  border-color: #9b2c2c;
  color: #ffffff;
}

.site-footer {
  background-color: #50555a;
  color: #f0f2f4;
  text-align: center;
  padding: 2rem;
  margin-top: 2rem;
}

.site-footer p {
  margin: 0;
  opacity: 0.8;
}

@media (max-width: 768px) {
  nav .container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .card,
  .code-example {
    /* On small screens, cards become inset "stripes" for a cleaner look */
    border-radius: 0;
    margin-left: -1rem;
    margin-right: -1rem;
    padding: 1.5rem 1rem;
  }

  .feature-cards {
    /* Switch to a single-column layout on mobile to prevent overflow */
    grid-template-columns: 1fr;
  }
}

.explainer-paragraph {
  font-size: 1.1rem;
  text-align: center;
  margin: 1rem 0 2.5rem;
  padding: 1.5rem 1.5rem 1.5rem 3rem;
  border-left: 8px solid #50555a;
  background-color: #f8f9fa;
  border-radius: 0;
  color: #31363b;
  position: relative;
}

.explainer-paragraph::before {
  content: '🤝';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
}

.breadcrumb {
  margin-bottom: 1.5rem;
  font-weight: bold;
}

.breadcrumb a {
  text-decoration: none;
  color: #31363b;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.footer-breadcrumb {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.protocol-explanation {
  background-color: #f8f9fa;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0;
  border: 1px solid #e3e6e8;
}

.protocol-explanation p {
  margin: 0;
}

.protocol-filename {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1rem;
  color: #50555a;
  margin-bottom: 1.5rem;
}

.protocol-content-divider {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}