/* ============================================
   Base — reset, typography, element defaults
   ============================================ */

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-body, var(--font-title, system-ui));
  color: var(--ink-soft);
  font-size: var(--type-body-lg-size, var(--type-body-size, 1.125rem));
  font-weight: var(--type-body-lg-weight, var(--type-body-weight, 400));
  line-height: var(--type-body-lg-line, var(--type-body-line, 1.4));
  letter-spacing: var(--type-body-lg-tracking, var(--type-body-tracking, -0.01em));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Type scale — base only; layout/theme refine further */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
}

h1 {
  font-family: var(--font-question, ui-serif);
  font-size: var(--type-h1-size, var(--type-display-size, 3rem));
  line-height: var(--type-h1-line, var(--type-display-line, 1.2));
  font-weight: var(--type-h1-weight, var(--type-display-weight, 700));
  letter-spacing: var(--type-h1-tracking, 0);
}

h2 {
  font-family: var(--font-question, ui-serif);
  font-size: var(--type-h2-size, var(--type-title-size, 2.25rem));
  line-height: var(--type-h2-line, var(--type-title-line, 1.2));
  font-weight: var(--type-h2-weight, var(--type-title-weight, 700));
  letter-spacing: var(--type-h2-tracking, 0);
}

h3 {
  font-family: var(--font-h3, system-ui);
  font-size: var(--type-h3-size, var(--type-ui-heading-size, 1.25rem));
  line-height: var(--type-h3-line, var(--type-ui-heading-line, 1.2));
  font-weight: var(--type-h3-weight, var(--type-ui-heading-weight, 500));
  letter-spacing: var(--type-h3-tracking, 0);
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* Keep pointer cursor consistent on interactive controls */
a[href],
button,
summary,
label[for],
input[type="button"],
input[type="submit"],
input[type="reset"],
input[type="checkbox"],
input[type="radio"],
select,
[role="button"],
[role="link"] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
  outline: none;
}
