html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

body.lbb-ui {
  background: var(--lbb-gradient-page);
  background-attachment: fixed;
  color: var(--lbb-text);
  font-family: var(--lbb-font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lbb-ui::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,255,255,0.16), transparent 20%),
    radial-gradient(circle at 82% 8%, rgba(212,165,181,0.08), transparent 18%);
  opacity: 0.9;
  z-index: 0;
}

body.lbb-ui .site,
body.lbb-ui .x-site,
body.lbb-ui #top {
  position: relative;
  z-index: 1;
}

a {
  color: var(--lbb-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

a:hover,
a:focus-visible {
  color: var(--lbb-link-hover);
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6,
.lbb-title-xl,
.lbb-title-lg,
.lbb-title-md,
.lbb-title-sm,
.lbb-divider-title {
  margin: 0;
  color: var(--lbb-text);
  font-family: var(--lbb-font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

h1,
.lbb-title-xl {
  font-size: clamp(2.6rem, 7vw, 5.25rem);
}

.lbb-title-xl--compact {
  max-width: 12ch;
}

h2,
.lbb-title-lg,
.lbb-divider-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

h3,
.lbb-title-md {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

h4,
.lbb-title-sm {
  font-size: clamp(1.08rem, 2vw, 1.25rem);
}

p,
ul,
ol,
.lbb-text,
.lbb-text-lg,
.lbb-text-sm,
.lbb-subtitle,
.lbb-prose {
  margin: 0;
  color: var(--lbb-text-soft);
}

.lbb-text-lg,
.lbb-subtitle {
  font-size: 1.05rem;
}

.lbb-text-sm {
  font-size: 0.92rem;
}

strong,
b {
  color: var(--lbb-text);
}

small {
  font-size: 0.85em;
}

ul,
ol {
  padding-left: 1.15rem;
}

blockquote {
  margin: 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--lbb-accent);
  border-radius: 0 var(--lbb-radius-md) var(--lbb-radius-md) 0;
  background: rgba(255,255,255,0.28);
}

::selection {
  background: rgba(155, 137, 184, 0.24);
}

input,
select,
textarea,
button {
  font: inherit;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--lbb-accent);
  outline-offset: 2px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.9rem 1rem;
  border: 1px solid var(--lbb-border);
  border-radius: var(--lbb-radius-md);
  background: color-mix(in srgb, var(--lbb-surface-strong) 82%, transparent);
  color: var(--lbb-text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--lbb-text-muted);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--lbb-border-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--lbb-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--lbb-accent) 14%, transparent), inset 0 1px 0 rgba(255,255,255,0.14);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

label {
  display: inline-block;
  margin-bottom: 0.4rem;
  color: var(--lbb-text);
  font-size: 0.94rem;
  font-weight: 600;
}

hr {
  border: 0;
  border-top: 1px solid var(--lbb-divider);
}

.lbb-ui body, body.lbb-ui { font-family: var(--lbb-font-body); }
