:root {
  color-scheme: light;
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #374151;
  --accent-strong: #111827;
  --accent-soft: #f3f4f6;
  --shadow: none;
  --page-max-width: 920px;
  --page-gutter: 32px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

.home-page {
  min-height: 100vh;
  overflow: hidden;
}

.home-shell {
  display: grid;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  transform: translateY(calc(50vh - 16px - 78px));
  z-index: 20;
  min-height: revert;
  place-items: center;
  padding: 24px;
  opacity: 1;
  filter: blur(0);
  pointer-events: none;
  transition: transform 680ms cubic-bezier(0.16, 1, 0.3, 1), opacity 420ms ease, filter 520ms ease;
  will-change: transform, opacity, filter;
}

body:not(.home-page) .home-shell {
  transform: translateY(0);
}

body:not(.home-page).dock-hidden .home-shell {
  transform: translateY(-92px);
  opacity: 0;
  filter: blur(10px);
}

body:not(.home-page).dock-hidden .home-apps {
  pointer-events: none;
}

.home-apps {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 8px 10px;
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 22px;
  background: rgba(249, 250, 251, 0.78);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  will-change: transform;
}

.dock-items {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  position: relative;
}

.home-app {
  display: flex;
  width: 52px;
  margin: 0;
  overflow: hidden;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  pointer-events: auto;
  transition: width 520ms cubic-bezier(0.16, 1, 0.3, 1), opacity 340ms ease, filter 420ms ease;
  will-change: width, opacity;
}

body:not(.home-page) .home-app:not(.is-current) {
  width: 0;
  margin-left: -9px;
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
}

body:not(.home-page) .home-app.is-current {
  width: 52px;
}

.home-app-link {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.home-app-link img {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #ffffff;
}

a {
  color: var(--accent-strong);
  text-decoration-color: #d1d5db;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-color: currentColor;
}

.shell {
  width: min(100% - var(--page-gutter), var(--page-max-width));
  margin: 0 auto;
  opacity: 0;
  padding: 156px 0 72px;
  transition: opacity 420ms ease;
}

.shell.is-visible {
  opacity: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  background: #f9fafb;
  color: var(--ink);
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.top-nav a {
  color: inherit;
}

.site-header.app-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-content: center;
  justify-content: flex-start;
  width: min(100%, 800px);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: center;
}

.site-header.app-header:empty {
  display: none;
}

.site-header.app-header .brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.site-header.app-header .brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.12), 0 4px 10px rgba(17, 24, 39, 0.08);
}

.segmented-nav {
  display: inline-flex;
  justify-content: center;
  gap: 0;
  position: fixed;
  top: calc(78px + 32px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 10;
  width: max-content;
  margin-top: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
  transition: transform 520ms cubic-bezier(0.16, 1, 0.3, 1);
}

body:not(.home-page).dock-hidden .segmented-nav {
  transform: translateX(-50%) translateY(-94px);
}

.segmented-nav::before {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  z-index: 0;
  width: calc((100% - 6px) / 2);
  border-radius: 7px;
  background: #f3f4f6;
  content: "";
  transition: transform 180ms ease;
}

.segmented-nav[data-active="terms"]::before {
  transform: translateX(100%);
}

.segmented-nav[data-active="privacy"]::before {
  transform: translateX(0);
}

.segmented-nav[data-active="none"]::before {
  opacity: 0;
}

.segmented-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  min-width: 72px;
  padding: 5px 10px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.segmented-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 750;
}

.policy-panel[hidden] {
  display: none;
}

.hero {
  max-width: 760px;
  padding: 24px 0 38px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p,
ul,
ol,
pre {
  margin-top: 0;
}

h1 {
  max-width: 880px;
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.lead {
  max-width: 690px;
  color: var(--muted);
  font-size: 1rem;
}

.app-list {
  margin-top: 28px;
}

.app-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 760px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.app-name {
  margin-bottom: 2px;
  font-size: 1.2rem;
  font-weight: 800;
}

.app-copy {
  margin-bottom: 0;
  color: var(--muted);
}

.doc-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.doc-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.doc-layout {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.policy-doc {
  width: min(100%, 800px);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.policy-doc header {
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.policy-doc h1 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.15;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.meta strong {
  color: var(--ink);
  font-weight: 750;
}

.policy-doc section {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.policy-doc section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.policy-doc h2 {
  margin-bottom: 12px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.policy-doc h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
}

.policy-doc p,
.policy-doc li {
  color: #374151;
}

.policy-doc ul,
.policy-doc ol {
  padding-left: 1.25rem;
}

.policy-doc li + li {
  margin-top: 8px;
}

.table-wrap {
  overflow-x: auto;
  margin: 20px 0 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

table {
  width: 100%;
  min-width: 660px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.94rem;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f9fafb;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

td {
  color: #374151;
  line-height: 1.55;
}

th + th,
td + td {
  border-left: 1px solid #f3f4f6;
}

tr:last-child td {
  border-bottom: 0;
}

.summary-block,
.notice-block,
pre {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.summary-block {
  background: var(--accent-soft);
}

.summary-block p,
.notice-block p {
  margin-bottom: 0;
}

pre {
  overflow-x: auto;
  color: #374151;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.footer-note {
  max-width: 780px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .site-header,
  .app-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-header.app-header {
    align-items: center;
  }

  .doc-layout {
    display: block;
  }

  .policy-doc {
    padding: 0;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 22px, var(--page-max-width));
    padding-top: 156px;
  }

  .policy-doc {
    padding: 0;
  }

  .doc-links {
    width: 100%;
  }

  .doc-links a {
    flex: 1;
    justify-content: center;
  }
}
