/* ============================================================
   Shared styles for Kanguro legal pages
   (privacy, terms, cookies — all languages)
   ============================================================ */
:root {
  --ink:        #111111;
  --ink-800:    #2A2A28;
  --ink-600:    #55554E;
  --ink-400:    #8A8A85;
  --ink-200:    #D8D8D2;
  --paper:      #FAFAF8;
  --surface:    #FFFFFF;
  --sunken:     #F2F2EE;
  --blue:       #478DF6;
  --blue-deep:  #3878E8;
  --rule:       rgba(17,17,17,.10);
  --rule-strong:rgba(17,17,17,.13);
  --ok:         #2F8F4E;
  --font-sans:  "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SF Mono", monospace;
  --ease-out:   cubic-bezier(.2,.6,.2,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,248,.96);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(140%) blur(6px);
}
.site-header .container {
  height: 64px; max-width: 1200px; margin: 0 auto; padding: 0 48px;
  display: flex; align-items: center; justify-content: space-between;
}
@media (max-width: 720px) { .site-header .container { padding: 0 20px; } }
.lockup { display: flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; color: inherit; }
.lockup .sym { width: 26px; height: 26px; }
.lockup .word { font-size: 21px; letter-spacing: -.035em; }
.header-right { display: flex; align-items: center; gap: 14px; }

/* ---- Language switcher ---- */
.lang-switcher { position: relative; font-family: var(--font-mono); }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  font-family: inherit;
  font-size: 11px; font-weight: 500;
  letter-spacing: .12em;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 120ms var(--ease-out);
}
.lang-trigger:hover { border-color: var(--ink-400); }
.lang-trigger .chev {
  width: 10px; height: 10px;
  stroke: var(--ink-600); stroke-width: 2;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 200ms var(--ease-out);
}
.lang-switcher.open .lang-trigger .chev { transform: rotate(180deg); }
.lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 180px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 10px 30px rgba(17,17,17,.10);
  padding: 6px; opacity: 0; transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 120ms var(--ease-out), transform 120ms var(--ease-out);
  z-index: 60;
}
.lang-switcher.open .lang-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lang-opt {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 10px; border: 0; background: transparent; cursor: pointer;
  border-radius: 8px; font-family: inherit; color: var(--ink); text-align: left;
  text-decoration: none;
}
.lang-opt:hover, .lang-opt.active { background: var(--sunken); }
.lang-opt .lang-short {
  font-size: 11px; font-weight: 500; letter-spacing: .14em;
  color: var(--ink-400); min-width: 22px;
}
.lang-opt.active .lang-short { color: var(--blue); }
.lang-opt .lang-name {
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; letter-spacing: -.005em;
}

/* ---- Main layout ---- */
main { flex: 1; padding: 64px 24px 96px; }
@media (max-width: 720px) { main { padding: 40px 20px 72px; } }
.wrap { max-width: 760px; margin: 0 auto; }
.wrap.wide { max-width: 880px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-400); margin-bottom: 18px;
}
h1 {
  font-size: 48px; line-height: 1.04; letter-spacing: -.03em;
  font-weight: 500; margin: 0 0 12px;
}
@media (max-width: 720px) { h1 { font-size: 34px; } }
.updated {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; letter-spacing: .08em;
  color: var(--ink-400); margin: 0 0 40px;
}

/* ---- Responsible-party panel (privacy page) ---- */
.responsible {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; padding: 24px 28px; margin-bottom: 48px;
}
.responsible h2 { margin: 0 0 14px; font-size: 15px; font-weight: 500; letter-spacing: -.005em; color: var(--ink); }
.responsible .resp-grid { display: grid; grid-template-columns: 200px 1fr; gap: 6px 24px; }
@media (max-width: 560px) { .responsible .resp-grid { grid-template-columns: 1fr; gap: 2px 0; } }
.responsible .k {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-400); padding-top: 4px;
}
.responsible .v { font-size: 14px; color: var(--ink); padding: 2px 0; }
@media (max-width: 560px) {
  .responsible .k { padding-top: 12px; }
  .responsible .k:first-child { padding-top: 0; }
}
.responsible .v a { color: var(--ink); }

/* ---- Content ---- */
.content { font-size: 15.5px; line-height: 1.7; color: var(--ink-800); }
.content h2 {
  font-size: 22px; line-height: 1.25; letter-spacing: -.015em;
  font-weight: 500; color: var(--ink);
  margin: 48px 0 12px; padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.content h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.content h3 {
  font-size: 16px; line-height: 1.35; letter-spacing: -.005em;
  font-weight: 500; color: var(--ink);
  margin: 28px 0 10px;
}
.content p { margin: 0 0 16px; }
.content ul { margin: 0 0 16px; padding-left: 22px; }
.content ul li { margin-bottom: 10px; }
.content a {
  color: var(--blue);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: .06em;
  word-break: break-word;
}
.content a:hover { color: var(--blue-deep); }
.content strong { font-weight: 500; color: var(--ink); }
.content code {
  font-family: var(--font-mono); font-size: .92em;
  background: var(--sunken); padding: 1px 6px; border-radius: 3px;
}

/* Terms-page numbering */
.content h2.numbered { display: flex; gap: 14px; align-items: baseline; }
.content h2.numbered .num {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; letter-spacing: .14em;
  color: var(--ink-400); flex-shrink: 0; width: 28px;
}
.content h3.numbered { display: flex; gap: 14px; align-items: baseline; }
.content h3.numbered .num {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: .12em;
  color: var(--ink-400); flex-shrink: 0; width: 32px;
}

/* Cookies preferences card */
.prefs-card {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: 12px; padding: 22px 26px; margin-bottom: 56px;
}
@media (max-width: 600px) { .prefs-card { grid-template-columns: 1fr; padding: 20px; } }
.prefs-card h4 { margin: 0 0 4px; font-size: 15px; font-weight: 500; letter-spacing: -.005em; }
.prefs-card p { margin: 0; font-size: 13.5px; color: var(--ink-600); line-height: 1.5; }
.prefs-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 20px;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 4px;
  font-family: var(--font-sans);
  font-size: 14px; font-weight: 500; letter-spacing: -.005em;
  cursor: pointer; transition: background 120ms var(--ease-out); white-space: nowrap;
}
.prefs-btn:hover { background: var(--ink-800); }
.prefs-btn:active { transform: scale(.98); }

/* Cookie tables */
.cookie-group { margin-bottom: 40px; }
.cookie-group .group-hdr {
  display: flex; align-items: baseline; gap: 12px;
  margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.cookie-group .group-hdr h3 { margin: 0; font-size: 17px; font-weight: 500; letter-spacing: -.005em; }
.cookie-group .group-hdr .count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .12em; color: var(--ink-400);
}
table.cookies {
  width: 100%; border-collapse: separate; border-spacing: 0;
  font-size: 13px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
}
table.cookies thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-400); padding: 12px 14px;
  background: var(--sunken); border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
table.cookies tbody td {
  padding: 14px; vertical-align: top;
  border-top: 1px solid var(--rule);
  color: var(--ink-800); line-height: 1.5;
}
table.cookies tbody tr:first-child td { border-top: 0; }
table.cookies .ck-key {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500;
  color: var(--ink); letter-spacing: .02em; white-space: nowrap;
}
table.cookies .ck-key a {
  display: block; font-family: var(--font-sans);
  font-size: 11px; font-weight: 500; letter-spacing: .02em;
  margin-top: 4px; color: var(--blue); text-decoration: none;
}
table.cookies .ck-key a:hover { text-decoration: underline; }
table.cookies .ck-domain, table.cookies .ck-path,
table.cookies .ck-type, table.cookies .ck-exp {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-600); white-space: nowrap;
}
table.cookies .ck-desc { font-size: 13px; color: var(--ink-800); min-width: 200px; }
@media (max-width: 720px) {
  table.cookies, table.cookies thead, table.cookies tbody,
  table.cookies tr, table.cookies td { display: block; width: 100%; }
  table.cookies thead { display: none; }
  table.cookies tbody tr { border-top: 1px solid var(--rule); padding: 14px 0; }
  table.cookies tbody tr:first-child { border-top: 0; }
  table.cookies tbody td {
    border: 0; padding: 4px 14px;
    display: grid; grid-template-columns: 90px 1fr; gap: 10px; white-space: normal;
  }
  table.cookies tbody td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 10px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
    color: var(--ink-400); padding-top: 2px;
  }
  table.cookies tbody td.ck-desc { padding-top: 8px; }
}

/* Back link */
.back-link {
  margin-top: 64px;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-600); text-decoration: none; padding: 10px 0;
}
.back-link:hover { color: var(--ink); }
.back-link svg {
  width: 14px; height: 14px;
  stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 120ms var(--ease-out);
}
.back-link:hover svg { transform: translateX(-2px); }

/* Footer */
.footer {
  border-top: 1px solid var(--rule); padding: 24px 0;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-400);
}
.footer .container {
  max-width: 1200px; margin: 0 auto; padding: 0 48px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; flex-wrap: wrap;
}
@media (max-width: 720px) { .footer .container { padding: 0 20px; } }
.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--ink-600); text-decoration: none; }
.footer nav a:hover { color: var(--ink); }
