/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

/* ── Body ── */
html, body {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    font-feature-settings: "ss01","ss03";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -.005em;
}

/* ── Headings ── */
h1, h2, h3, h4 {
    font-family: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    color: var(--ink);
    letter-spacing: -.02em;
    line-height: 1.25;
}
h1 { font-size: 1.75rem; font-weight: 600; margin-bottom: 6px; }
h2 { font-size: 1.1rem;  font-weight: 600; margin-bottom: 14px; }
h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 10px; }

/* ── Nav ── */
nav {
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    padding: 0 2rem;
    height: 64px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--rule);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 0 var(--rule);
}
.nav-logo { height: 45px; display: block; }

/* ── Layout ── */
.container { max-width: 900px; margin: 0 auto; padding: 28px 24px; }

/* ── Cards ── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--rule);
    transition: box-shadow .2s ease, border-color .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--rule-strong); }

.card-lg {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--rule-medium);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 22px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px -10px rgba(24,24,28,.45); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary  { background: var(--brand); color: #fff; border-color: transparent; }
.btn-primary:hover { background: var(--brand-dark); }

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border-color: var(--rule-strong);
}
.btn-secondary:hover { border-color: var(--ink-soft); background: rgba(24,24,28,.04); }

.btn-green  { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }

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

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--rule-medium);
}
.btn-ghost:hover { background: var(--paper-soft); }

.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; font-weight: 600; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .03em;
}
.badge-blue   { background: var(--accent-soft);  color: var(--accent-deep); }
.badge-orange { background: var(--brand-soft);   color: #a06828; }
.badge-green  { background: var(--green-soft);   color: var(--green-dark); }
.badge-red    { background: var(--red-soft);     color: #9b2322; }
.badge-gray   { background: rgba(24,24,28,.06);  color: var(--ink-soft); }
.badge-amber  { background: var(--amber-soft);   color: #a16207; }
.badge-purple { background: var(--purple-soft);  color: var(--purple); }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-group label {
    font-size: 13px; font-weight: 500;
    color: var(--ink-soft); display: block; margin-bottom: 5px;
    letter-spacing: .01em;
}

label {
    font-size: 13px; font-weight: 500;
    color: var(--ink-soft); display: block; margin-bottom: 5px;
    letter-spacing: .01em;
}
input, textarea, select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--surface);
    color: var(--ink);
    transition: border-color .18s ease, box-shadow .18s ease;
    margin-bottom: 16px;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { resize: vertical; }

/* ── Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--modal-backdrop);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }

.modal-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 40px 44px;
    width: 560px;
    max-width: 92vw;
    box-shadow: var(--shadow-modal);
}
.modal-card h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 32px;
}

/* ── Feedback ── */
.error { color: var(--red); font-size: 14px; margin-top: -10px; margin-bottom: 12px; }
.success-msg { color: var(--green); font-size: 14px; }
.divider { border: none; border-top: 1px solid var(--rule); margin: 20px 0; }

/* ── Utilities ── */
.text-muted   { color: var(--ink-faint); font-size: 14px; }
.text-sm      { font-size: 13px; }
.flex         { display: flex; }
.flex-col     { display: flex; flex-direction: column; }
.gap-1        { gap: 4px; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.gap-4        { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end  { justify-content: flex-end; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.w-full { width: 100%; }
