/* Eve brand colors — light cream default (#F9F1E8), dark #121212 */
:root {
  color-scheme: light dark;
  --rose: #8E455B;
  --rose-light: #A85A72;
  --dark: #F9F1E8;
  --dark-card: #FEF9F5;
  --surface: #FEF9F5;
  --chip: #F6E6E0;
  --text: #2F2A2A;
  --muted: #6b6460;
  --border: rgba(47, 42, 42, 0.1);
}

html[data-theme='dark'] {
  --dark: #121212;
  --dark-card: #1F1F1F;
  --surface: #1F1F1F;
  --chip: #2A2A2A;
  --text: #FEF9F5;
  --muted: #a5a5a5;
  --border: rgba(255, 255, 255, 0.08);
}

body {
  background: var(--dark);
  color: var(--text);
}

nav {
  background: color-mix(in srgb, var(--dark) 92%, transparent) !important;
}

/* Icon theme pill (system / light / dark) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--chip) 50%, transparent);
  padding: 4px;
}

.theme-toggle button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
}

.theme-toggle button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle button.active {
  background: var(--rose);
  color: #FEF9F5;
}

/* Language picker */
.lang-picker { position: relative; }
.lang-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--chip) 50%, transparent);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
}
.lang-picker-btn svg { width: 14px; height: 14px; stroke: var(--muted); fill: none; stroke-width: 2; }
/* Language modal */
.lang-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.lang-modal.open { display: flex; }
.lang-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.lang-modal-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(22rem, 88vw);
  height: min(22rem, 88vw);
  max-width: min(26rem, 92vw);
  max-height: min(26rem, 85vh);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
@media (min-width: 480px) {
  .lang-modal-panel { width: 26rem; height: 26rem; }
}
.lang-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.lang-modal-head h2 { font-size: 14px; font-weight: 700; margin: 0; color: var(--text); }
.lang-modal-head p { font-size: 11px; margin: 2px 0 0; color: var(--muted); }
.lang-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.lang-modal-close:hover { background: color-mix(in srgb, var(--chip) 60%, transparent); color: var(--text); }
.lang-modal-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.lang-modal-search input {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: color-mix(in srgb, var(--chip) 50%, transparent);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text);
  font-family: inherit;
  outline: none;
}
.lang-modal-grid-wrap {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
}
.lang-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
@media (min-width: 480px) {
  .lang-modal-grid { grid-template-columns: repeat(3, 1fr); }
}
.lang-modal-grid button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: color-mix(in srgb, var(--chip) 35%, transparent);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  min-height: 44px;
}
.lang-modal-grid button:hover {
  border-color: var(--border);
  background: color-mix(in srgb, var(--chip) 65%, transparent);
}
.lang-modal-grid button.active {
  border-color: var(--rose);
  background: color-mix(in srgb, var(--rose) 15%, transparent);
  color: var(--rose);
}
.lang-modal-grid .native {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.lang-modal-grid .english {
  font-size: 10px;
  line-height: 1.25;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.lang-modal-grid button.active .english { color: color-mix(in srgb, var(--rose) 75%, var(--muted)); }
.lang-modal-empty {
  padding: 32px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.footer-utilities {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.social-icons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.social-icons a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--chip) 55%, transparent);
}

.social-icons svg {
  width: 18px;
  height: 18px;
}

.site-footer-bottom .social-icons {
  margin-top: 0;
}

.footer-bottom-row,
.foot-bottom-row,
.site-footer-bottom .legal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
}

.footer-bottom-row > p,
.foot-bottom-row > p,
.site-footer-bottom .legal-row > p {
  margin: 0;
  justify-self: start;
}

.footer-bottom-row .social-icons,
.foot-bottom-row .social-icons,
.site-footer-bottom .legal-row .social-icons {
  justify-self: center;
}

.footer-bottom-row .footer-utilities,
.footer-bottom-row .foot-utils,
.foot-bottom-row .footer-utilities,
.foot-bottom-row .foot-utils,
.site-footer-bottom .legal-row .footer-utilities {
  justify-self: end;
}

.site-footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.site-footer-bottom .legal-row {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .footer-bottom-row,
  .foot-bottom-row,
  .site-footer-bottom .legal-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .footer-bottom-row .social-icons,
  .foot-bottom-row .social-icons,
  .site-footer-bottom .legal-row .social-icons {
    justify-self: start;
  }

  .footer-bottom-row .footer-utilities,
  .footer-bottom-row .foot-utils,
  .foot-bottom-row .footer-utilities,
  .foot-bottom-row .foot-utils,
  .site-footer-bottom .legal-row .footer-utilities {
    justify-self: start;
    width: 100%;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}

.site-footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
  color: var(--text);
}

.site-footer-col a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 0;
}

.site-footer-col a:hover { color: var(--text); }

.eve-static-footer,
footer.eve-static-footer {
  border-top: 1px solid var(--border);
  padding: 24px 40px;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--dark);
}

.eve-static-footer .footer-bottom {
  border-top: none;
  padding-top: 0;
}

.eve-static-footer p,
.eve-static-footer a {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
}

.eve-static-footer a:hover {
  color: var(--text);
}

body.eve-has-chrome-footer {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.eve-has-chrome-footer > footer {
  margin-top: auto;
  width: 100%;
}

.site-footer-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.legal-body,
.legal-block p,
.legal-block li {
  color: var(--muted);
}

.legal-block h2,
.legal-block h3,
.page-header h1 {
  color: var(--text);
}

@media (max-width: 900px) {
  .site-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .site-footer-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 32px 20px; }
}
