/* Mobile-first reset + base typography. Build up with min-width media queries, never max-width. */

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

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

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

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    margin: 0 0 var(--space-3);
    line-height: 1.25;
    letter-spacing: -0.01em;
}

h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

@media (min-width: 768px) {
    h1 { font-size: 1.9rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
}

a { color: var(--color-primary); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }

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

table { width: 100%; border-collapse: collapse; }

/* Every interactive element gets a real tap target on touch devices — tablets/phones are first-class here. */
button, input, select, textarea, a.btn {
    font-family: inherit;
    font-size: 1rem;
    min-height: var(--tap-target-min);
}

input, select, textarea {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    color: var(--color-text);
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

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

input:hover, select:hover, textarea:hover { border-color: #C9D6E3; }

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

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

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236a6a6a' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-5);
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-1);
    color: var(--color-heading);
}

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

.container {
    width: 100%;
    padding: 0 var(--space-3);
    margin: 0 auto;
    max-width: 1200px;
}
