:root {
  color-scheme: light;
  font-family: Georgia, "Times New Roman", serif;
  color: #334b9a;
  background: #fffcf2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
}

main {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 9vw, 5.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.045em;
  text-align: center;
}

button {
  min-height: 44px;
  border: 1px solid #b8bfd1;
  border-radius: 4px;
  padding: 10px 16px;
  color: #334b9a;
  background: transparent;
  font: 500 .8125rem/1.4 system-ui, sans-serif;
  cursor: pointer;
}

button:hover { background: #eeeee5; border-color: #334b9a; }

button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid #b17d13;
  outline-offset: 3px;
}

.consent-panel {
  position: fixed;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 20px;
  width: min(820px, calc(100% - 40px));
  max-height: calc(100svh - 40px);
  overflow-y: auto;
  margin-inline: auto;
  padding: 22px 24px 16px;
  border: 1px solid #d7d1bd;
  border-radius: 6px;
  background: #fffdf7;
  box-shadow: 0 4px 24px #25251d0d;
  color: #303b58;
  font: .875rem/1.55 system-ui, sans-serif;
}

.consent-panel h2, dialog h2 {
  margin: 0;
  color: #334b9a;
  font: 600 1rem/1.3 system-ui, sans-serif;
}

.consent-panel p { margin: 8px 0 0; }
dialog p { margin: 8px 0 0; }

.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.text-button {
  border: 0;
  padding: 10px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.text-button:hover { background: transparent; text-decoration-thickness: 2px; }

.preferences-button {
  position: fixed;
  right: 14px;
  bottom: max(8px, env(safe-area-inset-bottom));
  font-size: .75rem;
  color: #58627b;
}

dialog {
  width: min(540px, calc(100% - 32px));
  max-height: min(88svh, 720px);
  overflow: hidden;
  border: 1px solid #d7d1bd;
  border-radius: 6px;
  padding: 24px;
  color: #303b58;
  background: #fffdf7;
  font: .875rem/1.55 system-ui, sans-serif;
}

dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #18213c80; }

.dialog-heading {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-heading h2 { font-size: 1.125rem; }

.dialog-close {
  flex: 0 0 44px;
  padding: 0;
  font-size: 1.5rem;
}

dialog a { color: #334b9a; }

.privacy-content { min-height: 0; overflow-y: auto; margin: 16px 0 20px; padding-right: 5px; }
.privacy-content .privacy-intro { margin-top: 0; }
.cookie-category { margin-top: 20px; padding-top: 20px; border-top: 1px solid #e3dfd2; }
.category-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.category-heading h3 { margin: 0; font: 600 .875rem/1.4 system-ui, sans-serif; }
.category-heading label { cursor: pointer; }
.category-state { flex-shrink: 0; color: #58627b; font-size: .75rem; }
.category-heading input { flex: 0 0 24px; width: 24px; height: 24px; margin: 10px; accent-color: #334b9a; cursor: pointer; }
details { margin-top: 8px; }
summary { width: fit-content; padding: 10px 0; color: #334b9a; cursor: pointer; font-size: .8125rem; }
details p { color: #58627b; font-size: .8125rem; }
.privacy-note { color: #58627b; font-size: .75rem; }
.privacy-content > .privacy-note { margin-top: 16px; }
.privacy-actions { flex-shrink: 0; }
#storage-warning { font-size: .8125rem; }

@media (max-width: 700px) {
  .consent-panel { grid-template-columns: 1fr; gap: 12px; right: 12px; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100% - 24px); padding: 20px; }
}

@media (max-width: 420px) {
  .preferences-button { right: 12px; }
  .consent-panel { padding: 18px; }
  dialog { padding: 18px; }
  .category-heading { gap: 8px; }
  .category-state { font-size: .6875rem; }
}
