/* Snailberg Software – shared design language for support, legal, security and privacy sub-pages.
   Fonts are self-hosted via fonts/fonts.css (Fraunces + Outfit); no external requests. */

:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --color-forest: #5D7052;
  --color-moss: #7A8F6E;
  --color-sage: #9AAB8E;
  --color-cream: #F1EAD8;
  --color-sand: #C9BBA0;
  --color-amber: #D9A05B;
  --color-bark: #6B5340;
  --color-night: #1A2018;
  --color-dusk: #232D26;
  --color-line: rgba(201, 187, 160, 0.16);
  --color-card: rgba(26, 32, 24, 0.74);
  --btn-primary: #485D40;
  --btn-primary-hover: #53694A;
  --shadow-deep: 0 18px 50px rgba(0, 0, 0, 0.44);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  background: linear-gradient(180deg, var(--color-dusk) 0%, #20281F 42%, var(--color-night) 100%);
  background-attachment: fixed;
  color: var(--color-cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-wrap: break-word;
}

/* Subtle topographic pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='600' height='600' viewBox='0 0 600 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='rgba(241,234,216,0.04)' stroke-width='1.25'%3E%3Cpath d='M94 118c52-68 170-58 208 12 35 63-15 139-96 137-88-2-162-77-112-149z'/%3E%3Cpath d='M128 135c36-44 111-39 140 6 27 42-8 92-62 91-59-1-113-50-78-97z'/%3E%3Cpath d='M386 302c64-56 157-35 172 38 12 58-42 111-112 100-76-12-116-88-60-138z'/%3E%3Cpath d='M409 326c42-34 98-21 108 25 8 37-27 70-72 62-48-8-72-55-36-87z'/%3E%3Cpath d='M44 430c58-44 141-24 156 30 13 45-26 88-85 82-64-7-120-68-71-112z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 600px 600px;
}

/* ---------- Links ---------- */
a {
  color: var(--color-sage);
  text-underline-offset: 3px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
a:hover { color: var(--color-amber); }

main p a, main li a, main td a, main dd a {
  text-decoration: underline;
  text-decoration-color: rgba(154, 171, 142, 0.45);
  word-break: break-word;
}
main p a:hover, main li a:hover, main td a:hover { text-decoration-color: currentColor; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--color-amber);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Header ---------- */
header {
  position: relative;
  z-index: 2;
  padding: 1rem 2rem;
  background: var(--color-night);
  border-bottom: 1px solid var(--color-line);
}
header nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-cream);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}
.logo:hover { color: var(--color-cream); }
.logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--color-cream), 0 8px 18px rgba(0, 0, 0, 0.35);
}
.logo-text { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--color-cream); }

.nav-actions, .nav-links { display: flex; align-items: center; gap: 1.5rem; }

.back, .back-link, .language-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-sand);
  text-decoration: none;
  font-weight: 500;
}
.back:hover, .back-link:hover, .language-switch:hover { color: var(--color-amber); }

.lang-switch, .lang-links { display: flex; gap: 0.5rem; }
.lang-switch a, .lang-links a {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-sand);
  border: 1px solid var(--color-line);
  background: rgba(26, 32, 24, 0.42);
}
.lang-switch a.active, .lang-links a:hover, .lang-switch a:hover {
  color: var(--color-cream);
  border-color: rgba(217, 160, 91, 0.5);
  background: rgba(93, 112, 82, 0.28);
}

/* ---------- Main layout ---------- */
main {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem;
}
.policy-index main { max-width: 900px; }

.page-header { text-align: center; margin-bottom: 2rem; }

.page-eyebrow, .eyebrow, .kicker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-sage);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  text-align: center;
}
.page-eyebrow::before, .page-eyebrow::after, .eyebrow::before, .eyebrow::after, .kicker::before, .kicker::after {
  content: '';
  flex: 0 0 32px;
  height: 1px;
  background: var(--color-bark);
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.9rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-cream);
  text-align: center;
  margin-bottom: 1rem;
}

.subtitle, .lead, .app-name, .last-updated { color: var(--color-sand); text-align: center; }
.subtitle, .lead { max-width: 680px; margin: 0 auto 2.5rem; }
.app-name { font-size: 1.1rem; margin: 0 0 0.25rem; }
.last-updated { color: var(--color-sage); font-size: 0.9rem; margin: 0 0 2rem; }
.app-name + .last-updated { margin-top: 0; }
.page-header .subtitle, .page-header .last-updated { margin-top: -0.25rem; }

/* ---------- Cards ---------- */
.card, .legal-section, .general-section, .app-card, .highlight-box, .warning-box, .contact-info {
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: 20px;
  box-shadow: var(--shadow-deep);
  color: var(--color-sand);
}
.card, .legal-section, .general-section {
  padding: 2.25rem;
  margin: 0 0 1.5rem;
}
.card h2, .legal-section h2, .general-section h2, .app-info h2, main section > h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-cream);
  margin-bottom: 0.8rem;
}
.card h3, .legal-section h3, .general-section h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-sage);
  margin: 1.4rem 0 0.6rem;
}
.card p, .legal-section p, .general-section p, .app-info p { color: var(--color-sand); margin-bottom: 0.8rem; }
.card > :last-child, .legal-section > :last-child, .general-section > :last-child { margin-bottom: 0; }
.card ul, .card ol, .legal-section ul, .legal-section ol, .general-section ul { color: var(--color-sand); margin: 0.4rem 0 1rem 1.4rem; }
.card li, .legal-section li, .general-section li { color: var(--color-sand); margin-bottom: 0.45rem; }
.card strong, .legal-section strong, .general-section strong, .highlight-box strong, .warning-box strong, .contact-info strong, .notice strong { color: var(--color-cream); }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 0.9em; color: var(--color-cream); background: rgba(241, 234, 216, 0.08); padding: 0.1em 0.35em; border-radius: 5px; }

.highlight-box, .warning-box, .contact-info { padding: 1.5rem; margin: 1.5rem 0; }
.highlight-box { border-left: 4px solid var(--color-sage); }
.warning-box { border-left: 4px solid var(--color-amber); }
.contact-info { margin-top: 1rem; }
.contact-info p { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }

/* inline notice inside cards */
.notice {
  border-left: 4px solid var(--color-amber);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1rem 0;
  color: var(--color-sand);
}

/* ---------- Policy index ---------- */
.apps-grid { display: grid; gap: 1.5rem; }
.app-card {
  padding: 1.75rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.app-card:hover { border-color: rgba(217, 160, 91, 0.45); transform: translateX(6px); }
.app-icon { width: 64px; height: 64px; border-radius: 16px; flex-shrink: 0; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35); }
.app-info { flex: 1; min-width: 0; }
.app-info h2 { margin-bottom: 0.25rem; }
.app-info p { margin-bottom: 0.6rem; }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { padding: 0.9rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--color-line); }
th { color: var(--color-cream); font-weight: 600; background: rgba(26, 32, 24, 0.58); }
td { color: var(--color-sand); }

/* ---------- Buttons ---------- */
.btn, .button, .mail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-primary);
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  max-width: 100%;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
main a.btn, main a.button, main a.mail { color: var(--color-cream); text-decoration: none; }
.btn:hover, .button:hover, .mail:hover { background: var(--btn-primary-hover); transform: translateY(-2px); }
main a.btn:hover, main a.button:hover, main a.mail:hover { color: var(--color-cream); }
.btn-secondary, main a.btn-secondary {
  background: transparent;
  color: var(--color-sage);
  border-color: rgba(154, 171, 142, 0.5);
}
.btn-secondary:hover, main a.btn-secondary:hover { background: rgba(154, 171, 142, 0.08); border-color: var(--color-amber); color: var(--color-amber); }
.button-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.1rem; }
.mail { margin: 0.5rem 0; }

.contact-email, .contact-link, .inline-link { font-weight: 600; word-break: break-word; }

/* ---------- Panorama ---------- */
.panorama { position: relative; z-index: 1; height: 220px; margin-top: 3rem; overflow: hidden; pointer-events: none; }
.panorama svg { width: 100%; height: 100%; display: block; }

/* ---------- Footer ---------- */
footer {
  position: relative;
  z-index: 2;
  background: var(--color-night);
  border-top: 1px solid var(--color-line);
  padding: 2.5rem 2rem 3rem;
  text-align: center;
  color: var(--color-sage);
}
.footer-content { max-width: 1100px; margin: 0 auto; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.5rem 1.5rem; margin-bottom: 0.75rem; }
footer a { color: var(--color-sand); text-decoration: none; font-weight: 500; }
footer a:hover { color: var(--color-amber); text-decoration: underline; text-underline-offset: 3px; }
.copyright { color: var(--color-sage); font-size: 0.9rem; margin: 0; }

@media (max-width: 768px) {
  header { padding: 0.85rem 1.25rem; }
  header nav { gap: 0.75rem; }
  .logo, .logo-text { font-size: 1.1rem; }
  .logo img { width: 42px; height: 42px; }
  .nav-actions, .nav-links { flex-direction: column; align-items: flex-end; gap: 0.5rem; }
  main { padding: 2.25rem 1.25rem; }
  .card, .legal-section, .general-section { padding: 1.5rem 1.25rem; border-radius: 16px; }
  .app-card { flex-direction: column; text-align: center; padding: 1.5rem; }
  .app-card:hover { transform: none; }
  .lang-links { justify-content: center; }
  table { font-size: 0.85rem; }
  th, td { padding: 0.6rem 0.4rem; overflow-wrap: anywhere; hyphens: auto; }
  .panorama { height: 140px; margin-top: 2.5rem; }
  .button-row .btn { flex: 1 1 100%; }
}

@media (max-width: 420px) {
  .logo { font-size: 1rem; }
  .back, .back-link { font-size: 0.92rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .btn:hover, .button:hover, .mail:hover, .app-card:hover { transform: none; }
}
