:root {
  --bg: #e8f3f6;
  --surface: #ffffff;
  --surface-hover: #f0f8fa;
  --border: #9ecad6;
  --text: #4a5f78;
  --text-muted: #748dae;
  --accent: #748dae;
  --accent-hover: #5f7694;
  --accent-soft: #d4e8ee;
  --danger: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --font:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --layout-content-ratio: 72.5;
  --layout-content-width: calc(var(--layout-content-ratio) * 1vw);
  --layout-gutter-max: max(0px, calc((100vw - var(--layout-content-width)) / 2));
  --layout-gutter-preferred: 8rem;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: clip;
}

.page-shell {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 100dvh;
}

.page-gutter {
  flex: 1 999 var(--layout-gutter-preferred);
  min-width: 0;
  max-width: var(--layout-gutter-max);
  overflow: hidden;
  background: linear-gradient(
    to right,
    var(--bg),
    color-mix(in srgb, var(--border) 28%, var(--bg))
  );
}

.page-gutter--end {
  background: linear-gradient(to left, var(--bg), color-mix(in srgb, var(--border) 28%, var(--bg)));
}

.page-main {
  flex: 0 1 var(--layout-content-width);
  width: var(--layout-content-width);
  max-width: 100%;
  min-width: 0;
}

.container {
  width: 100%;
  margin: 0;
  padding: 2rem clamp(1rem, 2.5vw, 2rem);
}

.hero {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.hero .subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.card p,
.card li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s ease,
    transform 0.05s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--surface-hover);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--accent-soft);
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-list li {
  margin-bottom: 0.5rem;
}

.link-list a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
}

.link-list a:hover {
  text-decoration: underline;
}

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.875rem;
  border-radius: 9999px;
}

.step-content {
  flex: 1;
}

.step-title {
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: var(--text);
}

.step-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin: 0;
}

.step-image {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 100%;
  background: var(--surface-hover);
}

.step-image img {
  display: block;
  width: 100%;
  height: auto;
}

.container footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.container footer p {
  margin: 0;
}

.container footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

.container footer a:hover {
  color: var(--text);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 40, 84, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.25rem;
  overflow-y: auto;
}

.version-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.version-chip {
  padding: 0.375rem 0.75rem;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
}

.version-chip.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

.release-notes ul {
  margin: 0;
  padding-left: 1.25rem;
}

.release-notes li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.banner {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.banner.success {
  background: var(--accent-soft);
  color: var(--accent);
}

.banner.info {
  background: #d4e8ee;
  color: #4a5f78;
}

.iframe-container {
  position: relative;
  width: 100%;
  height: 600px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}

.iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.policy-section {
  margin-bottom: 2rem;
}

.policy-section h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.policy-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: var(--text);
}

.policy-section p,
.policy-section li {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.policy-section ul {
  padding-left: 1.25rem;
}

.policy-section li {
  margin-bottom: 0.375rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.image-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 40, 84, 0.85);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.image-overlay.open {
  display: flex;
}

.image-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .step {
    flex-direction: column;
    gap: 0.75rem;
  }
}
