:root {
  --bg-porcelain: #fbfaf7;
  --bg-stone: #f3f0ea;
  --bg-white: #ffffff;

  --ink: #1c1917;
  --ink-secondary: #3f3a34;
  --ink-muted: #57534e;

  --cobalt: #1d4ed8;
  --cobalt-hover: #1e40af;
  --teal: #0f766e;
  --vermilion: #c2410c;

  --forest: #1d4ed8;
  --cinnabar: #1d4ed8;

  --hairline: rgba(28, 25, 23, 0.06);
  --hairline-strong: rgba(28, 25, 23, 0.11);
  --radius-pill: 999px;

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC", sans-serif;
}

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

[hidden] {
  display: none !important;
}

html {
  font-size: 16px;
  color-scheme: light;
  accent-color: var(--cobalt);
  caret-color: var(--cobalt);
  scrollbar-color: rgba(87, 83, 78, 0.42) #f3f0ea;
  scrollbar-width: auto;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

::selection {
  background-color: rgba(29, 78, 216, 0.16);
  color: var(--ink);
}

body {
  margin: 0;
  background-color: var(--bg-porcelain);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.72;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  margin: 0;
  font-style: normal;
  text-wrap: balance;
}

p,
dl,
dd {
  margin: 0;
  font-style: normal;
  text-wrap: pretty;
}

#main[tabindex="-1"]:focus {
  outline: none;
}

:focus-visible {
  outline: 2.5px solid var(--cobalt);
  outline-offset: 3px;
}

section[id] {
  scroll-margin-top: 4.5rem;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  min-height: 44px;
  padding: 0.65rem 1.2rem;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  background-color: var(--cobalt);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-200%);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.wrap {
  width: 100%;
  max-width: 1140px;
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 10px 48px;
  background-color: rgba(251, 250, 247, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(28, 25, 23, 0.05);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  min-height: 3.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  flex-shrink: 0;
  white-space: nowrap;
}

.brand__mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.brand__name {
  font-size: 1.03125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-secondary);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.site-nav a:hover {
  background-color: rgba(15, 23, 42, 0.05);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  background-color: var(--cobalt);
  color: #ffffff;
  font-weight: 600;
}

/* Centered Minimal Legal / Support Document */
.doc-shell {
  max-width: 720px;
  margin-inline: auto;
  padding: 72px 32px 88px;
}

.doc-head {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--hairline-strong);
}

.doc-status {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-stone);
  color: var(--ink-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-top: 0.85rem;
}

.doc-head h1 {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.doc-head > p:last-child {
  margin-top: 0.95rem;
  font-size: 1.0625rem;
  line-height: 1.68;
  color: var(--ink-muted);
}

.doc-body {
  display: grid;
  gap: 2.75rem;
  padding-top: 2.75rem;
}

.doc-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.75rem;
}

.doc-section p {
  color: var(--ink-secondary);
  font-size: 0.984375rem;
  line-height: 1.78;
}

.doc-section p + p {
  margin-top: 0.75rem;
}

.doc-section p a {
  color: var(--cobalt);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.doc-list {
  margin: 0.85rem 0 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.6rem;
  color: var(--ink-secondary);
  font-size: 0.984375rem;
  line-height: 1.78;
}

.doc-list strong {
  color: var(--ink);
}

.doc-facts {
  margin-top: 1.25rem;
  border-top: 1px solid var(--hairline-strong);
}

.doc-facts > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.doc-facts dt {
  color: var(--ink-muted);
  font-weight: 500;
}

.doc-facts dd {
  color: var(--ink);
  font-weight: 600;
}

.doc-facts dd a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--cobalt);
}

/* 365 membership agreement: glossy squircle perk medallions */
#perks .doc-list {
  padding-left: 0;
  list-style: none;
  counter-reset: perk;
  gap: 1rem;
}

#perks .doc-list > li {
  position: relative;
  min-height: 36px;
  padding-left: 52px;
  counter-increment: perk;
}

#perks .doc-list > li::before {
  content: counter(perk);
  position: absolute;
  top: 0.1rem;
  left: 0;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background-color: #4338ca;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 50%),
    linear-gradient(150deg, #6366f1 0%, #4338ca 55%, #1e40af 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 3px rgba(0, 0, 0, 0.18),
    0 8px 16px -8px rgba(67, 56, 202, 0.7);
}

/* 365 membership agreement: stacked-sheet fact cards with specular rim */
#autorenew .doc-facts,
#entity .doc-facts {
  position: relative;
  margin-top: 2rem;
  padding: 0.25rem 1.5rem;
  border: 0;
  border-radius: 20px;
  background-color: var(--bg-white);
  background-image: linear-gradient(180deg, #ffffff 0%, #fdfcf9 100%);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 1px 2px rgba(28, 25, 23, 0.035),
    0 16px 36px -16px rgba(28, 25, 23, 0.09);
}

#autorenew .doc-facts::before,
#entity .doc-facts::before {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: calc(100% - 1px);
  height: 10px;
  border: 0;
  border-radius: 18px 18px 0 0 / 10px 10px 0 0;
  background-color: rgba(255, 255, 255, 0.76);
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 -4px 12px -6px rgba(28, 25, 23, 0.06);
  pointer-events: none;
}

#autorenew .doc-facts > div:last-child,
#entity .doc-facts > div:last-child {
  border-bottom: 0;
}

.site-footer {
  background-color: var(--bg-porcelain);
  border-top: 1px solid var(--hairline);
  padding: 38px 48px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.site-footer__brand {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
}

.site-footer__brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.site-footer__name {
  font-weight: 700;
  color: var(--ink);
}

.site-footer__origin {
  color: var(--ink-muted);
}

.site-footer__nav {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-muted);
  transition: color 0.18s ease;
}

.site-footer a:hover {
  color: var(--ink);
}

@media (max-width: 760px) {
  .site-header {
    padding: 10px 20px;
  }

  .site-nav a {
    padding: 0.45rem 0.6rem;
    font-size: 0.8125rem;
  }

  .doc-shell {
    padding: 52px 24px 68px;
  }

  .site-footer {
    padding: 32px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
}
