:root {
  --brand-main: #0f172a;
  --brand-accent: #0ea5a4;
  --text: #1f2937;
  --muted: #64748b;
  --background: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
}

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

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--background);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.legal-header {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  text-align: center;
}

.legal-header a {
  display: inline-block;
  max-width: 100%;
}

.legal-header img {
  display: block;
  width: min(580px, 90vw);
  max-width: 100%;
  height: auto;
  max-height: none;
}

.legal-card {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: clamp(20px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}

h1,
h2 {
  color: var(--brand-main);
  line-height: 1.25;
}

h1 {
  margin: 0 0 24px;
  font-size: clamp(28px, 5vw, 38px);
}

h2 {
  margin: 30px 0 10px;
  font-size: clamp(18px, 3vw, 23px);
}

p,
li {
  max-width: 100%;
}

a {
  color: #087f7e;
}

footer {
  width: 100%;
  margin-top: auto;
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: #fff;
  text-align: center;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
}

footer a,
footer a:hover,
footer a:focus,
footer a:visited {
  text-decoration: none;
}

.footer-legal-notice {
  width: min(920px, 100%);
  margin: 20px auto 0;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footer-legal-notice p {
  margin: 0 0 12px;
}

.footer-legal-notice p:last-child {
  margin-bottom: 0;
}

footer > p,
.footer-copyright {
  margin: 16px 0 0;
  text-align: center;
}

@media (max-width: 375px) {
  .legal-header,
  .legal-card {
    width: calc(100% - 20px);
  }

  .legal-card {
    padding: 18px;
  }
}
