/* ==========================================================
   KEYLINE — global.css · tag styles only
   ========================================================== */

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-text);
  font-size: var(--text-body);
  line-height: var(--line-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: var(--line-heading);
  letter-spacing: var(--tracking-display);
}

h1 { font-size: var(--text-h1); line-height: var(--line-tight); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); }
h5 { font-size: var(--text-h5); font-family: var(--font-text); font-weight: 600; letter-spacing: -0.01em; }
h6 { font-size: var(--text-h6); font-family: var(--font-text); font-weight: 600; letter-spacing: 0; }

em {
  font-style: normal;
  color: var(--color-text-soft);
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--duration-fast) var(--ease);
}

a:hover {
  color: var(--color-accent);
}

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

ul, ol {
  margin: 0;
  padding-left: 1.25rem;
}

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

blockquote {
  margin: 0;
  padding-left: var(--space-l);
  border-left: 2px solid var(--color-accent);
  font-family: var(--font-display);
  font-size: var(--text-h4);
  line-height: 1.3;
}

hr {
  border: 0;
  border-top: var(--border-width) solid var(--color-border);
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--text-small);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-m);
  background-color: var(--color-white);
  color: var(--color-text);
  font: inherit;
  transition: border-color var(--duration-fast) var(--ease);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--color-grey-dark);
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

[hidden] {
  display: none !important;
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 3rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%230A0A0A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 6.25 8 10.75l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 1rem 1rem;
  cursor: pointer;
}
