:root {
  color-scheme: dark;
  --color-accent: #c74910;
  --color-bg: #212121;
  --color-surface: #252525;
  --color-text: #c8c8c8;
  --color-muted: #9a9a9a;
  --color-border: #464646;
  --content-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--color-bg);
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  justify-content: center;
  min-height: 64px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(33, 33, 33, 0.96);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: min(100%, var(--content-width));
  padding: 12px 16px;
  color: var(--color-text);
  text-decoration: none;
}

.brand__icon {
  display: block;
  border-radius: 8px;
}

.brand__name {
  font-size: 20px;
  font-weight: 600;
}

.page {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.agreement h1 {
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 24px;
  color: var(--color-text);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.agreement h1::after {
  display: block;
  width: 50%;
  max-width: 280px;
  height: 3px;
  margin: 16px auto 0;
  background: var(--color-accent);
  content: "";
}

.agreement__text {
  min-height: 240px;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

.agreement__text.is-muted {
  color: var(--color-muted);
}

::selection {
  background: var(--color-accent);
  color: #0b0b0b;
}

@media (max-width: 640px) {
  .topbar {
    min-height: 56px;
  }

  .brand {
    padding: 10px 14px;
  }

  .brand__icon {
    width: 36px;
    height: 36px;
  }

  .page {
    padding: 24px 14px 44px;
  }
}
