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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f2f5;
  color: #1a1a2e;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrapper {
  max-width: 780px;
  margin: 40px auto;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}

.message { padding: 48px; text-align: center; color: #595a5c; }

@media (max-width: 800px) {
  .wrapper { margin: 0; border-radius: 0; box-shadow: none; }
}

.actions { padding: 0 48px 48px; text-align: center; }
.actions button {
  font: inherit;
  padding: 8px 20px;
  border: 1px solid #c8cacd;
  border-radius: 6px;
  background: #ffffff;
  color: #1a1a2e;
  cursor: pointer;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 120px auto;
  border: 4px solid #d9dbde;
  border-top-color: #595a5c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.site-frame {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Home page only. Everything is scoped under .home; the uploaded-page frame is a separate
   sandboxed document and never sees these rules. */
.home {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  padding-bottom: 220px;
  background: #EEF8F7;
  color: #3C0E23;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.home-banner { background: #E5173F; padding: 14px 32px; position: relative; z-index: 2; }
.home-logo { display: block; height: 30px; width: auto; }
.home .wrapper { position: relative; z-index: 1; border: 1px solid #DDF1F0; box-shadow: 0 4px 24px rgba(75,17,44,0.10); }
.home h1, .home h2 { letter-spacing: -0.04em; color: #4B112C; }

.home .overview { padding: 40px 48px 24px; }
.home .overview h1 { font-size: 2rem; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 12px; }
.home-mark { flex: none; border-radius: 10px; }
.home .overview .lede { color: #6F4156; margin-bottom: 20px; }
.home .overview h2 { font-size: 1.15rem; font-weight: 700; margin: 24px 0 8px; }
.home .overview ol { padding-left: 1.4em; }
.home .overview li { margin-bottom: 6px; }
.home .overview li::marker { color: #E5173F; font-weight: 700; }
.home .overview .how-to-video { max-width: 640px; aspect-ratio: 16 / 9; margin: 8px 0 16px; border-radius: 8px; overflow: hidden; background: #000; }
.home .overview .how-to-video iframe { width: 100%; height: 100%; border: 0; display: block; }
.home .overview code { background: #FCE7EB; color: #890E26; padding: 1px 5px; border-radius: 4px; }

.home .rules { padding: 0 48px 48px; }
.home .rules h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.home .rules-intro { color: #6F4156; margin-bottom: 12px; }
.home .rules ul { list-style: none; }
.home .rules li { border-top: 1px solid #DBCFD5; }
.home .rules li:last-child { border-bottom: 1px solid #DBCFD5; }
.home .rules summary { padding: 10px 0; cursor: pointer; font-weight: 600; color: #4B112C; }
.home .rules summary::marker { color: #43948F; }
.home .rules summary:hover { color: #CE1539; }
.home .rules details p { padding: 0 0 12px; color: #6F4156; }

.home-shards { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.shard { position: absolute; opacity: 0.55; }
.shard-a { width: 240px; left: -60px; bottom: -30px; transform: rotate(-14deg); }
.shard-a path { fill: #DBCFD5; }
.shard-b { width: 120px; right: 6%; bottom: -70px; transform: rotate(38deg); }
.shard-b path { fill: #F7B9C5; }
.shard-c { width: 70px; left: 31%; bottom: 36px; transform: rotate(-52deg); }
.shard-c path { fill: #A9DCD9; }
.shard-d { width: 150px; right: -50px; top: 90px; transform: rotate(24deg); }
.shard-d path { fill: #BBE3E1; }
.shard-e { width: 100px; left: 58%; bottom: -26px; transform: rotate(160deg) scale(1.1); }
.shard-e path { fill: #C9B7BF; }

@media (max-width: 800px) {
  .home-banner { padding: 12px 20px; }
  .home .overview { padding: 28px 20px 16px; }
  .home .rules { padding: 0 20px 32px; }
  .shard-a { width: 160px; }
  .shard-b { width: 80px; }
}

/* Confirmation before leaving the page frame, and the blocked-link notice. */
.leave-prompt {
  margin: auto;
  width: min(440px, calc(100vw - 32px));
  padding: 28px;
  border: 0;
  border-top: 6px solid #E5173F;
  border-radius: 12px;
  background: #ffffff;
  color: #3C0E23;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: 0 12px 40px rgba(75,17,44,0.35);
}
.leave-prompt::backdrop { background: rgba(60,14,35,0.6); }
.leave-prompt h2 { font-size: 1.25rem; letter-spacing: -0.03em; color: #4B112C; margin-bottom: 14px; }
.leave-host { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; color: #4B112C; overflow-wrap: anywhere; }
.leave-href { font-size: 0.85rem; color: #6F4156; overflow-wrap: anywhere; margin-bottom: 14px; }
.leave-addresses { list-style: none; margin-bottom: 14px; font-weight: 600; overflow-wrap: anywhere; }
.leave-note { color: #6F4156; margin-bottom: 22px; }
.leave-buttons { display: flex; justify-content: flex-end; gap: 12px; }
.leave-buttons button {
  font: inherit;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 6px;
  cursor: pointer;
}
.leave-cancel { background: #ffffff; color: #4B112C; border: 2px solid #4B112C; }
.leave-go { background: #E5173F; color: #ffffff; border: 2px solid #E5173F; }
.leave-buttons button:disabled { opacity: 0.5; cursor: not-allowed; }
.leave-buttons button:focus-visible { outline: 3px solid #54B9B3; outline-offset: 2px; }

/* "Powered by Access Pages" bar above a page view. While it shows, the page frame starts below it. */
.promo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 48px;
  background: #4B112C;
  border-bottom: 3px solid #E5173F;
  color: #ffffff;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9rem;
}
.promo-bar-title { font-weight: 700; }
.promo-bar a { color: #ffffff; text-decoration: underline; }
.promo-bar a:hover { color: #FFD6DE; }
.promo-bar a:focus-visible, .promo-close:focus-visible { outline: 3px solid #54B9B3; outline-offset: 2px; }
.promo-close {
  position: absolute;
  top: 6px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.promo-close:hover { background: rgba(255,255,255,0.15); }
.site-frame.with-bar { top: 40px; height: calc(100% - 40px); }

.link-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10;
  padding: 10px 18px;
  border-radius: 8px;
  background: #4B112C;
  color: #ffffff;
  font-size: 0.95rem;
  box-shadow: 0 4px 16px rgba(75,17,44,0.35);
}
