/* ==========================================================================
   CharRoll — global styles
   Light editorial layout, dark footer, zero external fonts.
   ========================================================================== */

:root {
  --paper: #faf8f3;
  --paper-2: #f2ede3;
  --card: #ffffff;
  --ink: #12121a;
  --ink-2: #2b2c37;
  --muted: #63656f;
  --line: #e6e0d4;
  --line-2: #d6cfbf;

  --violet: #4b30e4;
  --violet-dark: #3a22c4;
  --violet-soft: #edeaff;
  --coral: #ff6a3d;
  --coral-soft: #ffede5;
  --mint: #0d8a5f;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;

  --shadow-xs: 0 1px 2px rgba(18, 18, 26, 0.04);
  --shadow-sm: 0 1px 0 rgba(18, 18, 26, 0.03), 0 2px 8px -4px rgba(18, 18, 26, 0.1);
  --shadow: 0 14px 32px -20px rgba(18, 18, 26, 0.4), 0 2px 6px rgba(18, 18, 26, 0.04);
  --shadow-lg: 0 40px 80px -48px rgba(18, 18, 26, 0.5), 0 10px 24px -18px rgba(18, 18, 26, 0.25);

  --max: 1140px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--violet);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--violet-dark);
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-radius: 8px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.032em;
  font-weight: 800;
  color: var(--ink);
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.15em;
}

li + li {
  margin-top: 0.4em;
}

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  vertical-align: baseline;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 24px;
}

section[id],
[id]:target {
  scroll-margin-top: 88px;
}

@media (max-width: 560px) {
  .wrap {
    padding-inline: 18px;
  }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 99;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 243, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(230, 224, 212, 0.9);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.035em;
  font-size: 17.5px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--violet), #8659f6 52%, var(--coral));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  flex: none;
  box-shadow: 0 4px 12px -6px rgba(75, 48, 228, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  font-size: 14.5px;
}

.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 9px;
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: rgba(18, 18, 26, 0.055);
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--violet);
  background: var(--violet-soft);
}

@media (max-width: 700px) {
  .site-nav a:not(.nav-cta) {
    display: none;
  }
}

.nav-cta {
  background: var(--ink) !important;
  color: #fff !important;
  padding: 9px 15px !important;
  margin-left: 6px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 6px 16px -10px rgba(18, 18, 26, 0.9);
}

.nav-cta:hover {
  background: #000 !important;
}

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(18, 18, 26, 0.085) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 100%);
  mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 100%);
  opacity: 0.55;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(46% 55% at 20% 30%, rgba(75, 48, 228, 0.16), transparent 70%),
    radial-gradient(40% 50% at 82% 12%, rgba(255, 106, 61, 0.14), transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero--home .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 56px;
  align-items: center;
  padding-block: 74px 68px;
}

@media (max-width: 1000px) {
  .hero--home .wrap {
    grid-template-columns: 1fr;
    padding-block: 52px 48px;
    gap: 0;
  }
  .hero-preview {
    display: none;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--violet);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(75, 48, 228, 0.18);
  box-shadow: var(--shadow-xs);
  border-radius: 999px;
  padding: 6px 13px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  max-width: 17ch;
  letter-spacing: -0.045em;
}

.hero .lede {
  margin-top: 20px;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 54ch;
}

.hero .lede strong {
  color: var(--ink-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

@media (max-width: 560px) {
  .hero-actions {
    margin-top: 24px;
  }
  .hero-actions .btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
  }
  .hero-actions .btn:first-child {
    flex-basis: 100%;
  }
}

.hero-note {
  margin: 26px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}

.hero-note span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-note span::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 999px;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3 4.7 8.5 9.4 3.8' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
  flex: none;
}

/* hero preview stack */

.hero-preview {
  position: relative;
  height: 404px;
  perspective: 1200px;
}

.preview-card {
  position: absolute;
  width: 248px;
  padding: 14px 16px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.preview-card .pc-av {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  background: linear-gradient(142deg, hsl(var(--h) 72% 58%), hsl(calc(var(--h) + 34) 74% 46%));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.preview-card b {
  display: block;
  margin-top: 11px;
  font-size: 16px;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.preview-card small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.preview-card .pc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.preview-card .pc-tags i {
  font-style: normal;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: var(--paper-2);
  color: var(--ink-2);
  border-radius: 5px;
  padding: 3px 6px;
}

.pc-1 {
  top: 4px;
  left: 6px;
  transform: rotate(-6deg);
  z-index: 1;
}

.pc-2 {
  top: 132px;
  left: 98px;
  transform: rotate(3deg);
  z-index: 3;
}

.pc-3 {
  top: 258px;
  left: 10px;
  transform: rotate(8deg);
  z-index: 2;
}

.hero-preview:hover .pc-1 {
  transform: rotate(-9deg) translate(-8px, -10px);
}
.hero-preview:hover .pc-2 {
  transform: rotate(1deg) translate(10px, -2px);
}
.hero-preview:hover .pc-3 {
  transform: rotate(11deg) translate(-4px, 12px);
}

/* page head (tool + legal pages) */

.page-head {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(680px 280px at 8% -30%, rgba(75, 48, 228, 0.1), transparent 70%),
    radial-gradient(560px 260px at 96% -10%, rgba(255, 106, 61, 0.09), transparent 70%);
}

.page-head .wrap {
  padding-block: 40px 38px;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
  margin-bottom: 18px;
  letter-spacing: 0.01em;
}

.crumb a {
  color: var(--muted);
  text-decoration: none;
}

.crumb a:hover {
  color: var(--violet);
  text-decoration: underline;
}

.crumb span[aria-hidden] {
  opacity: 0.45;
}

.page-head h1 {
  font-size: clamp(1.95rem, 4.2vw, 3rem);
  max-width: 24ch;
}

.page-head .lede {
  margin-top: 16px;
  color: var(--muted);
  max-width: 66ch;
  font-size: 1.02rem;
}

.page-head .lede strong {
  color: var(--ink-2);
}

@media (max-width: 560px) {
  .page-head .wrap {
    padding-block: 26px 26px;
  }
  .page-head .lede {
    font-size: 0.97rem;
    margin-top: 12px;
  }
  .page-head h1 {
    font-size: 1.9rem;
  }
  .crumb {
    margin-bottom: 14px;
  }
  .hero-note {
    margin-top: 18px;
    font-size: 12.5px;
    gap: 6px 14px;
  }
  .tool {
    padding-block: 18px 4px;
  }
  .section {
    padding-block: 46px;
  }
  .section--tight {
    padding-block: 38px;
  }
}

/* --------------------------------------------------------------- buttons */

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 20px;
  font: inherit;
  font-weight: 700;
  font-size: 15.5px;
  line-height: 1.2;
  min-height: 47px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease;
}

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

.btn-primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 10px 22px -14px rgba(75, 48, 228, 1), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.btn-primary:hover {
  background: var(--violet-dark);
  color: #fff;
}

.btn-ghost {
  background: var(--card);
  border-color: var(--line-2);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.btn-ghost:hover {
  background: #fff;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #000;
  color: #fff;
}

.btn-sm {
  padding: 9px 13px;
  font-size: 13.5px;
  min-height: 36px;
  border-radius: 9px;
}

.btn .emoji {
  font-size: 15px;
  line-height: 1;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ------------------------------------------------------------------ tool */

.tool {
  padding-block: 28px 8px;
}

.panel {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

@media (max-width: 560px) {
  .panel {
    padding: 16px;
    border-radius: 20px;
    box-shadow: 0 20px 44px -32px rgba(18, 18, 26, 0.5);
  }
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.field > label,
.field-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

select {
  appearance: none;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  color: var(--ink);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%2363656f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 14px center;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 11px 40px 11px 14px;
  min-height: 47px;
  cursor: pointer;
  max-width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select:hover {
  border-color: var(--ink-2);
}

select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(75, 48, 228, 0.12);
  outline: none;
}

.segmented {
  display: inline-flex;
  background: var(--paper-2);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}

.segmented button {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  padding: 9px 15px;
  min-height: 44px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 2px 6px -2px rgba(18, 18, 26, 0.2);
}

.controls .spacer {
  flex: 1 1 32px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.inline-links {
  font-size: 13.5px;
  color: var(--muted);
  margin-left: 4px;
}

.inline-links a {
  color: var(--ink-2);
  font-weight: 650;
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
}

.inline-links a:hover {
  color: var(--violet);
  border-bottom-color: var(--violet);
}

@media (max-width: 560px) {
  .inline-links {
    margin-left: 0;
    flex-basis: 100%;
    font-size: 13px;
  }
}

@media (max-width: 560px) {
  .panel .actions {
    width: 100%;
  }
  .panel .actions .btn {
    flex: 1 1 calc(50% - 5px);
  }
  .panel .actions #generate,
  .panel .actions #home-roll {
    flex-basis: 100%;
  }
}

.pool-note {
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  line-height: 1.5;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
}

.tag-pill--violet {
  background: var(--violet-soft);
  border-color: rgba(75, 48, 228, 0.16);
  color: var(--violet-dark);
}

/* ----------------------------------------------------------------- tabs */

.mode-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}

.mode-tabs button {
  font: inherit;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 11px 2px;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.mode-tabs button + button {
  margin-left: 22px;
}

.mode-tabs button:hover {
  color: var(--ink);
}

.mode-tabs button[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--violet);
}

/* ---------------------------------------------------------------- cards */

.results {
  margin-top: 26px;
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.results-head h2 {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}

.results-head .count {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2);
  background: var(--paper-2);
  border-radius: 999px;
  padding: 3px 9px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(222px, 1fr));
  gap: 13px;
  min-height: 120px;
}

@media (max-width: 520px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
  }
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 15px 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: card-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--i, 0) * 26ms);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
  box-shadow: 0 16px 34px -24px rgba(18, 18, 26, 0.55);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(9px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .preview-card {
    animation: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 13px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(
    142deg,
    hsl(var(--h, 250) 72% 58%),
    hsl(calc(var(--h, 250) + 34) 74% 46%)
  );
  flex: none;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28),
    0 6px 14px -10px hsl(var(--h, 250) 70% 40%);
}

.card-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.22;
}

.card-sub {
  font-size: 12.8px;
  color: var(--muted);
  font-weight: 600;
  margin: 4px 0 0;
  line-height: 1.4;
}

.card-tags {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  padding-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.card-tags li {
  margin: 0;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-2);
  border-radius: 5px;
  padding: 3px 6px;
}

.card-tags li.is-accent {
  background: var(--violet-soft);
  color: var(--violet-dark);
}

/* 44px hit target (PRD §6.2) with a 30px visual chip inside */
.card-reroll {
  border: 0;
  background: transparent;
  color: #a8aab8;
  width: 44px;
  height: 44px;
  margin: -7px -7px 0 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  flex: none;
}

.card-reroll-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 9px;
  font-size: 14px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.card:hover .card-reroll {
  color: var(--muted);
}

.card-reroll:hover {
  color: var(--violet);
}

.card-reroll:hover .card-reroll-icon {
  background: var(--violet-soft);
  color: var(--violet);
  border-color: rgba(75, 48, 228, 0.2);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-2);
  border-radius: 18px;
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  margin-bottom: 6px;
}

/* ------------------------------------------------------------------- oc */

.oc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
  gap: 12px;
}

.oc-field {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 16px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 100px;
}

.oc-field header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.oc-field .oc-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.oc-field .oc-value {
  font-weight: 700;
  font-size: 16.5px;
  line-height: 1.32;
  letter-spacing: -0.015em;
}

.oc-field--wide {
  grid-column: 1 / -1;
  background: linear-gradient(120deg, #fff, var(--violet-soft) 130%);
  border-color: rgba(75, 48, 228, 0.16);
}

.oc-field--wide .oc-value {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.04em;
}

.dice {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  color: var(--muted);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dice:hover {
  background: var(--violet-soft);
  border-color: rgba(75, 48, 228, 0.3);
  color: var(--violet);
}

/* --------------------------------------------------------------- section */

.section {
  padding-block: 64px;
}

.section--tight {
  padding-block: 48px;
}

.band {
  background: var(--card);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 62ch;
  margin-bottom: 28px;
}

.section-head .kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 2.7vw, 2.05rem);
  letter-spacing: -0.035em;
}

.section-head p {
  margin-top: 12px;
  color: var(--muted);
}

.prose {
  max-width: 72ch;
}

/* long-form layout with a sticky fact rail */

.doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 60px;
  align-items: start;
}

.doc .prose {
  max-width: 68ch;
}

.doc-rail {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 14px;
}

.rail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.rail-card .col-title {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 12px;
}

.rail-card dl {
  margin: 0;
  display: grid;
  gap: 9px;
}

.rail-card .rail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
  border-bottom: 1px dashed var(--line);
  padding-bottom: 9px;
}

.rail-card .rail-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.rail-card .rail-row b {
  color: var(--ink);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.rail-nav {
  display: grid;
  gap: 2px;
  font-size: 13.5px;
}

.rail-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
  border-left: 2px solid var(--line);
  padding-left: 12px;
  font-weight: 600;
}

.rail-nav a:hover {
  color: var(--violet);
  border-left-color: var(--violet);
}

@media (max-width: 980px) {
  .doc {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .doc-rail {
    position: static;
    order: -1;
  }
  .rail-nav {
    display: none;
  }
}

.prose--center {
  margin-inline: auto;
}

.prose h2 {
  font-size: 1.4rem;
  margin-top: 1.9em;
  margin-bottom: 0.6em;
  letter-spacing: -0.03em;
}

.prose h3 {
  font-size: 1.1rem;
  margin-top: 1.7em;
  margin-bottom: 0.45em;
}

.prose ul,
.prose ol {
  color: var(--ink-2);
}

.prose > :first-child {
  margin-top: 0;
}

.note {
  border: 1px solid rgba(75, 48, 228, 0.16);
  background: linear-gradient(120deg, var(--violet-soft), #fff 120%);
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 14.5px;
  color: var(--ink-2);
  margin-top: 26px;
}

.note p:last-child {
  margin-bottom: 0;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 16px;
}

.feature {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 22px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px -34px rgba(18, 18, 26, 0.6);
  border-color: var(--line-2);
}

.feature .f-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: var(--paper-2);
  margin-bottom: 4px;
}

.feature h3 {
  font-size: 17.5px;
  letter-spacing: -0.03em;
}

.feature p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
}

.feature .btn {
  margin-top: auto;
  align-self: flex-start;
  margin-top: 14px;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.steps li {
  counter-increment: step;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px 20px 20px 58px;
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.55;
  box-shadow: var(--shadow-xs);
}

.band .steps li {
  background: var(--paper);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: var(--violet-soft);
  color: var(--violet);
  font-weight: 800;
  font-size: 12.5px;
  display: grid;
  place-items: center;
}

.steps strong {
  display: block;
  color: var(--ink);
  font-size: 15.5px;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
}

/* ------------------------------------------------------------------- faq */

.faq {
  display: grid;
  gap: 9px;
  max-width: 82ch;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 17px 20px;
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.faq details:hover {
  border-color: var(--line-2);
}

.faq details[open] {
  box-shadow: var(--shadow-sm);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.015em;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding-block: 10px;
  margin-block: -10px;
  min-height: 44px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-weight: 600;
  color: var(--violet);
  font-size: 20px;
  line-height: 1;
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--violet-soft);
}

.faq details[open] summary::after {
  content: "–";
}

.faq details > p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.faq details > p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  background: #101018;
  color: #a9abb8;
  margin-top: 0;
  padding-block: 52px 30px;
  font-size: 14px;
  position: relative;
}

.site-footer .brand {
  color: #fff;
}

.site-footer .brand:hover {
  color: #fff;
}

.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 36px;
}

@media (max-width: 720px) {
  .site-footer .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 26px;
  }
  .site-footer .footer-grid > :first-child {
    grid-column: 1 / -1;
  }
}

.site-footer p {
  color: #8e919f;
  line-height: 1.6;
}

.site-footer nav {
  display: grid;
  gap: 9px;
  align-content: start;
}

.site-footer nav a {
  color: #c9cbd6;
  text-decoration: none;
  font-weight: 550;
  width: fit-content;
}

.site-footer nav a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer .col-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 4px;
}

.legal {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  line-height: 1.7;
  color: #767988;
}

.legal p {
  margin-bottom: 8px;
  color: inherit;
}

.legal a {
  color: #a9abb8;
}

.site-footer .legal {
  color: #767988;
}

/* ----------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  background: #101018;
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 650;
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  max-width: calc(100vw - 32px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border-radius: 999px;
  background: var(--mint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3 4.7 8.5 9.4 3.8' fill='none' stroke='white' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

/* --------------------------------------------------------------- utility */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mt-0 {
  margin-top: 0 !important;
}

.center {
  text-align: center;
}

.lead-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
