/* Savaresi Connect: public privacy page. Colours and type from ios/DESIGN.md. */
@font-face {
  font-family: "Archivo";
  src: url("/assets/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --ground: #ffffff;
  --surface: #f5f5f7;
  --rule: #e8e8ed;
  --ink: #1d1d1f;
  --ink-secondary: #6e6e73;
  --brand-red: #d6202a;
  --link: #1d1d1f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #000000;
    --surface: #1c1c1e;
    --rule: #2c2c2e;
    --ink: #f5f5f7;
    --ink-secondary: #98989d;
    --link: #f5f5f7;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

header.top {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 2.5rem;
}

.mark { width: 2.25rem; height: 2.25rem; flex: none; }
.mark .ink { fill: none; stroke: var(--ink); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.mark .red { fill: none; stroke: var(--brand-red); stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.mark .s { fill: var(--ink); }

.wordmark {
  font-family: "Archivo", -apple-system, system-ui, sans-serif;
  font-variation-settings: "wght" 700, "wdth" 112;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

nav.lang {
  margin-left: auto;
  font-size: .9375rem;
}
nav.lang a { color: var(--ink-secondary); text-decoration: none; padding: .5rem .25rem; }
nav.lang a:hover, nav.lang a:focus-visible { color: var(--ink); text-decoration: underline; }

h1, h2, h3 {
  font-family: "Archivo", -apple-system, system-ui, sans-serif;
  line-height: 1.15;
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-variation-settings: "wght" 700, "wdth" 112;
  font-weight: 700;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.375rem;
  font-variation-settings: "wght" 700, "wdth" 106;
  font-weight: 700;
  letter-spacing: -0.012em;
  margin-top: 2.5rem;
  margin-bottom: .75rem;
}

h3 {
  font-size: 1.0625rem;
  font-variation-settings: "wght" 650, "wdth" 106;
  font-weight: 650;
  margin-top: 1.5rem;
  margin-bottom: .5rem;
}

p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: .4rem; }

.lede {
  font-size: 1.125rem;
  color: var(--ink-secondary);
  margin-top: .75rem;
}

.meta {
  font-size: .9375rem;
  color: var(--ink-secondary);
}

a { color: var(--link); text-underline-offset: .15em; }

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9375rem;
  line-height: 1.45;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: .75rem .875rem;
  border-bottom: 1px solid var(--rule);
}

tr:last-child td { border-bottom: 0; }

th {
  background: var(--surface);
  font-weight: 600;
  white-space: nowrap;
}

td:first-child { font-weight: 600; min-width: 9rem; }

.note {
  background: var(--surface);
  border-radius: 12px;
  padding: 1rem 1.125rem;
  margin: 0 0 1rem;
}

.note p:last-child { margin-bottom: 0; }

hr.lang-break {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 4rem 0 3rem;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: .875rem;
  color: var(--ink-secondary);
}

/* Narrow screens: each table row becomes a small card (data, purpose, retention). */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .page { padding-top: 1.5rem; }
  .table-wrap { border: 0; border-radius: 0; overflow: visible; }
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr {
    border: 1px solid var(--rule);
    border-radius: 12px;
    margin-bottom: .75rem;
    padding: .25rem 0;
  }
  td { border-bottom: 0; padding: .375rem .875rem; }
  td:first-child { min-width: 0; font-size: 1rem; padding-top: .625rem; }
  td:nth-child(2)::before, td:nth-child(3)::before {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--ink-secondary);
    margin-bottom: .125rem;
  }
  :lang(it) td:nth-child(2)::before { content: "A cosa serve"; }
  :lang(it) td:nth-child(3)::before { content: "Per quanto tempo"; }
  :lang(en) td:nth-child(2)::before { content: "Purpose"; }
  :lang(en) td:nth-child(3)::before { content: "Retention"; }
  td:last-child { padding-bottom: .625rem; }
}
