/* Shared styles for SEO articles and legal pages */
:root {
  --bg-color: #12100e;
  --text-color: #e6e2d6;
  --border-color: rgba(230, 226, 214, 0.15);
  --border-focus: #e6e2d6;
  --muted: rgba(230, 226, 214, 0.6);
  --body: rgba(230, 226, 214, 0.85);
  --radius-lg: 8px;
  --radius-md: 6px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-premium: 0 12px 30px rgba(0, 0, 0, 0.4), 0 4px 10px rgba(0, 0, 0, 0.2);
}

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

body {
  font-family: 'EB Garamond', Georgia, serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 1.25rem 1rem 2rem;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  position: relative;
}

.nav-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  position: relative;
  min-height: 44px;
}

.nav-bar .back-btn {
  justify-self: start;
  grid-column: 1;
}

.nav-bar .site-nav {
  grid-column: 2;
  justify-content: center;
}

.nav-bar .nav-toggle {
  justify-self: end;
  grid-column: 3;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  height: 44px;
  padding: 0 0.75rem;
  font-family: 'Ovo', serif;
  font-size: 0.95rem;
  color: rgba(230, 226, 214, 0.75);
  text-decoration: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: var(--transition);
  position: relative;
  z-index: 1003;
}

.back-btn:hover {
  color: var(--text-color);
  border-color: var(--border-focus);
}

.back-btn svg {
  flex-shrink: 0;
}

.header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.brand a {
  color: inherit;
  text-decoration: none;
}

.brand h1,
.brand .brand-title {
  font-family: 'Ovo', serif;
  font-size: clamp(1.55rem, 5vw, 2.2rem);
  font-weight: 400;
  margin-bottom: 0.35rem;
}

.brand p {
  color: var(--muted);
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  line-height: 1.4;
}

.nav-toggle {
  display: none;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
  z-index: 1002;
}

.nav-toggle:hover {
  border-color: var(--border-focus);
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.nav-toggle-icon span {
  display: block;
  height: 1.5px;
  width: 100%;
  background: var(--text-color);
  border-radius: 1px;
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.site-header.nav-open .nav-toggle-icon span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-icon span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
}

.site-nav a {
  font-family: 'Ovo', serif;
  font-size: 0.95rem;
  color: rgba(230, 226, 214, 0.75);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--transition);
  text-underline-offset: 4px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text-color);
  text-decoration: underline;
}

.nav-backdrop {
  display: none;
}

.card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  line-height: 1.65;
  font-size: 1.05rem;
}

.article-meta {
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.card h1 {
  font-family: 'Ovo', serif;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card h2 {
  font-family: 'Ovo', serif;
  font-size: 1.4rem;
  font-weight: 400;
  margin-top: 0.75rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
}

.card h3 {
  font-family: 'Ovo', serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-top: 0.35rem;
}

.card p,
.card ul,
.card ol {
  color: var(--body);
}

.card ul,
.card ol {
  margin-left: 1.25rem;
}

.card li {
  margin-bottom: 0.45rem;
}

.card a {
  color: var(--text-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.card a:hover {
  text-decoration: none;
}

.card code {
  font-family: 'Anonymous Pro', monospace;
  font-size: 0.9em;
  background: rgba(230, 226, 214, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.card pre {
  font-family: 'Anonymous Pro', monospace;
  font-size: 0.88rem;
  background: rgba(230, 226, 214, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  color: var(--text-color);
  line-height: 1.45;
}

.cta-box {
  margin-top: 0.5rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(230, 226, 214, 0.03);
}

.cta-box p {
  margin-bottom: 0.75rem;
}

.cta-btn {
  display: inline-block;
  font-family: 'Ovo', serif;
  font-size: 1rem;
  color: var(--bg-color) !important;
  background: var(--text-color);
  text-decoration: none !important;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.cta-btn:hover {
  opacity: 0.9;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-bottom: 0.35rem;
}

.related-list {
  list-style: none;
  margin-left: 0;
}

.related-list li {
  margin-bottom: 0.55rem;
}

.article-list {
  list-style: none;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.article-list li {
  margin: 0;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border-color);
}

.article-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.article-list h2 {
  border: none;
  padding: 0;
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.article-list h2 a {
  text-decoration: none;
}

.article-list h2 a:hover {
  text-decoration: underline;
}

.article-list .excerpt {
  color: var(--body);
  font-size: 1rem;
}

footer {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
  line-height: 1.5;
}

footer a {
  color: var(--text-color);
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

@media (max-width: 720px) {
  body {
    padding: 1rem 0.85rem 1.75rem;
  }

  .brand {
    text-align: left;
    padding-right: 3.25rem;
    padding-left: 0;
  }

  .nav-bar {
    display: flex;
    justify-content: space-between;
    min-height: 44px;
  }

  .back-btn {
    position: fixed;
    top: 1rem;
    left: 0.85rem;
    z-index: 1003;
  }

  .nav-toggle {
    display: flex;
    position: fixed;
    top: 1rem;
    right: 0.85rem;
    z-index: 1003;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1000;
  }

  .site-header.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(300px, 86vw);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
    padding: 5rem 1.5rem 2rem;
    background-color: var(--bg-color);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    visibility: hidden;
    pointer-events: none;
  }

  .site-header.nav-open .site-nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav a {
    font-size: 1.1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border-color);
    white-space: normal;
    color: var(--text-color);
  }

  .site-nav a:last-child {
    border-bottom: none;
  }

  .card {
    padding: 1.25rem;
    font-size: 1rem;
  }

  .card h2 {
    font-size: 1.2rem;
  }
}
