/* Light-first tokens aligned with Wordsrite app (globals.css HSL). */
:root {
  --background: #ffffff;
  --foreground: #111111;
  --muted: #ebebeb;
  --muted-foreground: #717171;
  --border: #eeeeee;
  --secondary: #f5f5f5;
  --rail-width: 260px;
  --right-rail-width: 300px;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #000000;
    --foreground: #e8e8e8;
    --muted: #1f1f1f;
    --muted-foreground: #888888;
    --border: #1a1a1a;
    --secondary: #0a0a0a;
  }
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  opacity: 0.85;
}

.shell {
  display: flex;
  min-height: 100vh;
  max-width: 1600px;
  margin: 0 auto;
}

.rail {
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  background: var(--background);
}

.rail-left {
  width: var(--rail-width);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.rail-right {
  display: flex;
  flex-direction: column;
  width: var(--right-rail-width);
  border-right: none;
  border-left: 1px solid var(--border);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  padding: 0.25rem 0.5rem 1rem;
}

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

.nav-list-primary {
  flex: 0 0 auto;
}

.rail-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.625rem 0.5rem 0.375rem;
}

.more-nav {
  flex: 0 0 auto;
}

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

.more-nav-link {
  display: block;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.125rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.35;
  text-decoration: none;
}

.more-nav-link:hover {
  background: var(--secondary);
  opacity: 1;
}

.more-nav-link.is-active {
  background: var(--secondary);
  color: var(--foreground);
}

.rail-left-spacer {
  flex: 1 1 auto;
  min-height: 0.5rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  cursor: default;
}

a.nav-item {
  cursor: pointer;
  text-decoration: none;
  color: var(--muted-foreground);
}
a.nav-item:hover {
  background: var(--secondary);
  color: var(--foreground);
}

.nav-item.is-active {
  background: var(--secondary);
  color: var(--foreground);
  font-weight: 500;
}

.nav-icon {
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
}

.rail-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.avatar-placeholder {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--muted);
  flex-shrink: 0;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 1rem 1.25rem 2rem;
}

.page-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--background);
}

.page-head h1 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

.back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.375rem;
  color: var(--foreground);
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}
.back:hover {
  background: var(--secondary);
}

.search-placeholder {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
}

.rail-right .network-block {
  flex: 1 1 auto;
  min-height: 0;
}

.network-block h2 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}

.network-placeholder {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  min-height: 4rem;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

@media (prefers-color-scheme: dark) {
  .card {
    background: #18181b;
    box-shadow: none;
  }
}

.card h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.card-body {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--foreground);
}

.card-body p {
  margin: 0 0 1rem;
}
.card-body p:last-child {
  margin-bottom: 0;
}

.card-body ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0 0 0 1rem;
}
.card-body li {
  margin-bottom: 0.5rem;
}
.card-body li:last-child {
  margin-bottom: 0;
}

.card-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.card-body a:hover {
  opacity: 0.85;
}

.card-body strong {
  font-weight: 600;
}

/* Legal pages: lettered subsections + nested lists */
h4.legal-subhead,
.legal-subhead {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.legal-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.legal-blocks {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card-body .legal-roman {
  list-style: none;
  margin: 0;
  padding-left: 1.25rem;
}

.card-body .legal-roman li {
  margin-bottom: 0.35rem;
}

.card-body .legal-roman li:last-child {
  margin-bottom: 0;
}

.card-body .legal-letter {
  list-style: none;
  margin: 0;
  padding-left: 1rem;
}

.card-body .legal-letter li {
  margin-bottom: 0.35rem;
}

.card-body .legal-letter li:last-child {
  margin-bottom: 0;
}

/* /more/pricing */
.bg-background {
  background: var(--background);
}

.pricing-grid {
  display: grid;
  gap: 1rem;
  margin-top: 0.25rem;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.pricing-card {
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  padding: 1.25rem;
  text-align: left;
  font-family: var(--font-sans);
  min-height: 14rem;
}

.pricing-card--muted {
  background: var(--secondary);
}

.pricing-card--selected {
  box-shadow: 0 0 0 2px var(--foreground);
}

.pricing-card h2 {
  font-size: 1.125rem;
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 0;
}

.pricing-card .price-big {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0.75rem 0 0.25rem;
}

.pricing-card .price-sub {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin: 0;
}

.pricing-card ul {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.45;
}

.pricing-card li {
  margin-bottom: 0.35rem;
}

.pricing-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.pricing-radio {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  border: 2px solid var(--muted-foreground);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.pricing-card--selected .pricing-radio {
  border-color: var(--foreground);
  background: var(--foreground);
  box-shadow: inset 0 0 0 3px var(--background);
}

.pricing-cta {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.pricing-cta button {
  width: 100%;
  max-width: 28rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--foreground);
  color: var(--background);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
}

.pricing-cta button:hover {
  opacity: 0.9;
}

.ml-4 {
  margin-left: 1rem;
}
.ml-8 {
  margin-left: 2rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}

@media (max-width: 1024px) {
  .shell {
    flex-direction: column;
  }
  .rail-left,
  .rail-right {
    position: relative;
    height: auto;
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--border);
  }
  .rail-right {
    border-bottom: none;
    border-top: 1px solid var(--border);
  }
  .rail-left .rail-footer {
    display: none;
  }
}
