/* ── Global palette ──────────────────────────────────────── */
:root {
    --bg:            #f7f1e3;
    --bg-raised:     #fdf8ef;
    --border:        #d4c49a;
    --border-light:  #e8dfc8;
    --text:          #2a1c08;
    --text-muted:    #7a6040;
    --accent:        #b8751e;
    --accent-hover:  #9a6018;
    --accent-light:  #f2e5cc;
    --danger:        #a83030;
    --danger-hover:  #882020;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem 3rem;
}

/* ── Nav ─────────────────────────────────────────────────── */
nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 0 0.75rem;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid var(--border);
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

nav a:hover,
nav a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Typography ──────────────────────────────────────────── */
h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem;
    letter-spacing: -0.01em;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.75rem 0 0.5rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-light);
}

h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.25rem 0 0.4rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Buttons ─────────────────────────────────────────────── */
button,
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

/* Primary */
button[type="submit"],
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

button[type="submit"]:hover,
.btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Danger / delete */
.delete-btn {
    background: transparent;
    border: 1.5px solid var(--danger);
    color: var(--danger);
    padding: 0.35rem 0.85rem;
    font-size: 0.8rem;
}

.delete-btn:hover {
    background: var(--danger);
    color: #fff;
}

/* ── Form inputs ─────────────────────────────────────────── */
input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.45rem 0.65rem;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text);
    background: var(--bg-raised);
    border: 1.5px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(184, 117, 30, 0.15);
}

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
    display: block;
}
