@import url('reset.css');

:root {
  --color-primary: #0f766e; /* teal-700, 5.5:1 contrast with white */
  --color-primary-hover: #115e59; /* teal-800 */
  --color-primary-text: #0f766e; /* same as primary, 5.5:1 on white */
  --color-success: #22c55e;
  --color-warning: #eab308;
  --color-error: #ef4444;
  --color-error-bg: #b91c1c; /* red-700, 6.5:1 contrast with white, for buttons */
  --color-error-bg-hover: #991b1b; /* red-800 */
  --color-success-text: #15803d; /* 4.5:1+ on white */
  --color-warning-text: #a16207;
  --color-error-text: #dc2626;
  --color-bg: #f0f4f8;
  --color-bg-focus: #fff;
  --color-text: #1a202c;
  --color-heading: #2d3748;
  --color-border: #cbd5e1;
  --color-placeholder: #94a3b8;
  --color-muted: #475569; /* 7.7:1 on white, 7.0:1 on disabled bg */
  --color-disabled: #f1f5f9;
  --color-focus-ring: color-mix(in srgb, var(--color-primary) 20%, transparent);
}

body {
  background-color: var(--color-bg);
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--color-text);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--color-heading);
  font-weight: 700;
  line-height: 1.25;
}

h1,
.header-1 {
  font-size: 3rem;
}

h2,
.header-2 {
  font-size: 2.25rem;
}

h3,
.header-3 {
  font-size: 1.875rem;
}

h4,
.header-4 {
  font-size: 1.5rem;
}

h5,
.header-5 {
  font-size: 1.25rem;
}

h6,
.header-6 {
  font-size: 1rem;
}

p,
.body {
  font-size: 1rem;
}

.body-sm {
  font-size: 0.875rem;
}

.body-lg {
  font-size: 1.125rem;
}

.body-primary {
  color: var(--color-primary-text);
  font-weight: 500;
}

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

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

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s,
    color 0.15s,
    border-color 0.15s;
}

button:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  color: white;
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary-text);
  border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn-tertiary {
  background-color: transparent;
  color: var(--color-primary-text);
  padding: 0.5rem;
}

.btn-tertiary:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

label {
  display: block;
  font-weight: 400;
  margin-bottom: 0.25rem;
}

input,
textarea,
select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background-color: white;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

input[type='submit'] {
  width: auto;
  min-width: 160px;
  cursor: pointer;
}

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

select {
  cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-focus-ring);
}

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

input:disabled,
textarea:disabled,
select:disabled {
  background-color: var(--color-disabled);
  cursor: not-allowed;
}

form input + label,
form textarea + label,
form select + label {
  margin-top: 1.5rem;
}

.mb-md {
  margin-bottom: 1.5rem;
}
