/* Shared type system — loaded after page-level styles so all screens speak
   with the same typeface, scale, rhythm, labels, and controls. */
:root {
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "DM Sans", Arial, sans-serif;
  --type-xs: 0.72rem;
  --type-sm: 0.84rem;
  --type-body: 0.95rem;
  --type-lead: 1.05rem;
  --type-h3: clamp(1.1rem, 1.35vw, 1.3rem);
  --type-h2: clamp(1.7rem, 2.7vw, 2.65rem);
  --type-h1: clamp(2.15rem, 4vw, 4.1rem);
  --line-tight: 1.06;
  --line-body: 1.6;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-body) !important;
}

body {
  font-size: 1rem;
  line-height: var(--line-body);
  font-weight: 400;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display) !important;
  font-weight: 700;
  letter-spacing: -0.035em;
}

h1 {
  font-size: var(--type-h1);
  line-height: var(--line-tight);
}

h2 {
  font-size: var(--type-h2);
  line-height: 1.1;
}

h3 {
  font-size: var(--type-h3);
  line-height: 1.18;
}

p,
li {
  line-height: var(--line-body);
}

/* Reusable interface text: buttons, fields, and navigation all share the
   same compact but readable treatment. */
body :is(button, .btn, [class*="-btn"], [class*="-button"]) {
  font-family: var(--font-body) !important;
  font-size: var(--type-sm);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

body :is(input, select, textarea) {
  font-size: var(--type-body);
  line-height: 1.4;
}

body :is(label, .form-label, [class*="__label"], [class$="-label"]) {
  font-family: var(--font-body) !important;
  font-size: var(--type-xs);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body :is(
  .home-section__eyebrow,
  .about-eyebrow,
  .browse-hero__eyebrow,
  .browse-section-kicker,
  .plans-eyebrow,
  .legal-eyebrow,
  .legal-sidebar__eyebrow,
  .checkout-kicker,
  .login-kicker,
  .register-kicker,
  .sell-eyebrow,
  .dashboard-side-card__label,
  .staff-kpi-card__label
) {
  font-family: var(--font-body) !important;
  font-size: var(--type-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.25;
}

/* Marketing screen hierarchy uses one display scale; page-level spacing and
   colour remain free to vary, but headings no longer jump between systems. */
body :is(.home-page, .about-page, .browse-page) h1 {
  font-size: var(--type-h1);
  line-height: var(--line-tight);
}

body :is(.home-page, .about-page, .browse-page, .sell-page, .plans-page) h2 {
  line-height: 1.08;
}

body :is(.login-shell, .register-shell, .checkout-page, .contact-page, .legal-page, .dashboard-page) h1 {
  font-size: clamp(2rem, 3.3vw, 3.35rem);
  line-height: var(--line-tight);
}

body :is(.login-shell, .register-shell, .checkout-page, .contact-page, .legal-page, .dashboard-page) h2 {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.12;
}

@media (max-width: 767.98px) {
  :root {
    --type-body: 0.94rem;
    --type-lead: 1rem;
    --type-h3: 1.08rem;
    --type-h2: clamp(1.55rem, 7vw, 2.05rem);
    --type-h1: clamp(2rem, 9vw, 3rem);
  }

  body :is(button, .btn, [class*="-btn"], [class*="-button"]) {
    font-size: 0.84rem;
  }
}
