/*
 * Feadan — site styles.
 * Monochrome, graphic, Swiss-minimal: heavy tracked type for headings, thin hairlines instead
 * of boxed cards, uppercase tracked labels for anything meta (nav, badges, table headers),
 * sharp corners, black/white with gray for muted text — no brand color except for the two
 * semantic states (error/success) kept deliberately quiet.
 */

:root {
    --ink:          #111111;
    --bg:           #ffffff;
    --surface:      #ffffff;
    --muted:        #8c8c8c;
    --muted-2:      #bcbcbc;
    --border:       #e2e2e2;
    --border-2:     #ededed;
    --danger:       #9c2b20;
    --danger-soft:  #faeeec;
    --success:      #2e6b3e;
    --success-soft: #edf4ee;
    --radius:       2px;
    --font-sans:    -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.55;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

::selection { background: var(--ink); color: var(--bg); }

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

header.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 62px;
    padding: 0 32px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

header.topbar .brand {
    font-weight: 800;
    font-size: 14px;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
header.topbar .brand:hover { text-decoration: none; }
header.topbar .brand::after { content: "."; }

header.topbar nav { display: flex; align-items: center; gap: 26px; }
header.topbar nav a {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
header.topbar nav a:hover { color: var(--ink); text-decoration: none; }
header.topbar .tier-badge { margin-right: 2px; }

main {
    max-width: 720px;
    margin: 0 auto;
    padding: 64px 32px 110px;
}

main.wide { max-width: 980px; }

h1 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    line-height: 1.08;
}
h2 {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink);
    margin: 52px 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
h2::before { content: "\2014\A0"; color: var(--muted); } /* em-dash + nbsp */
h3 { font-size: 14.5px; font-weight: 700; margin-bottom: 4px; }
p.lead { color: var(--muted); font-size: 15.5px; margin-bottom: 32px; max-width: 48ch; }

/* Standalone note/info blocks — a hairline frame, not a filled box. */
.card {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 18px 20px;
    margin-bottom: 14px;
}

/* A bounded frame for a list + its related form (library list, pipe band list, member list...).
   Minimal — no fill, no shadow — but it stops repeated rows and their form from reading as
   loose, ungrounded content floating in whitespace. .panel-divider marks an internal section
   break (e.g. between a list and the form that adds to it) without a second outer border. */
.panel {
    border: 1px solid var(--border);
    margin-bottom: 40px;
}
.panel-body { padding: 6px 20px; }
.panel-body > .card-row:first-child { padding-top: 13px; }
.panel-body > .card-row:last-child { border-bottom: none; padding-bottom: 13px; }
.panel-divider { border-top: 1px solid var(--border); }
.panel-empty { padding: 16px 2px; color: var(--muted); font-size: 13px; }

/* Repeated rows (library list, member list, pipe band list) read as a plain divided list
   rather than a stack of boxed cards. */
.card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: none;
    border-radius: 0;
    padding: 15px 2px;
    border-bottom: 1px solid var(--border-2);
    margin-bottom: 0;
}
.card-row:last-child { border-bottom: none; }

.muted { color: var(--muted); font-size: 13px; }

.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: var(--radius);
    border: 1.5px solid var(--ink);
    background: var(--bg);
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); text-decoration: none; }

.btn-primary {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--bg);
}
.btn-primary:hover { background: var(--bg); color: var(--ink); }

.btn-danger { color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: var(--bg); }

.btn-secondary { color: var(--muted); border-color: var(--border); }
.btn-secondary:hover { background: var(--muted); border-color: var(--muted); color: var(--bg); }

.btn-small { padding: 5px 11px; font-size: 10px; }

form.stacked { display: flex; flex-direction: column; gap: 15px; max-width: 380px; }

label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 6px;
    display: block;
}

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13.5px;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface);
    transition: border-color 0.12s ease;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--ink);
}

.inline-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { display: flex; flex-direction: column; gap: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table th, table td { text-align: left; padding: 10px 6px; border-bottom: 1px solid var(--border-2); word-break: break-word; }
table th {
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
table tr:last-child td { border-bottom: none; }

/* A link/token field with a one-click copy button — never lets a long URL push a table or
   row wider than its container (fixes links overflowing their box). */
.copy-field { margin: 10px 0; }
.copy-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; max-width: 100%; }
.copy-url {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    padding: 7px 9px;
}

.pagination { display: flex; align-items: center; gap: 16px; margin-top: 24px; font-size: 12px; }
.pagination .muted { font-size: 12px; }

/* A small bordered tag, not a filled pill. */
.badge {
    display: inline-block;
    padding: 2px 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}
.badge-free { color: var(--muted); border-color: var(--border); }
.badge-pro { color: var(--ink); border-color: var(--ink); }

/* Left-rule notices instead of filled alert boxes. */
.flash {
    background: var(--surface);
    border-left: 3px solid var(--ink);
    padding: 11px 16px;
    margin-bottom: 24px;
    font-size: 13.5px;
    color: var(--ink);
}
.flash-error { border-left-color: var(--danger); color: var(--danger); }
.flash-success { border-left-color: var(--success); color: var(--success); }
.flash-notice { border-left-color: var(--muted-2); color: var(--muted); }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    margin: 20px 0 44px;
}
.pricing-card { background: var(--surface); padding: 24px 20px; }
.pricing-card h3 {
    font-size: 10.5px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}
.pricing-card .price { font-size: 26px; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.01em; }
.pricing-card ul { padding-left: 18px; font-size: 13px; color: var(--muted); }
.pricing-card li { margin-bottom: 4px; }

code, .code {
    font-family: ui-monospace, 'SF Mono', 'Menlo', 'Monaco', monospace;
    font-size: 12px;
    background: var(--border-2);
    color: var(--ink);
    padding: 2px 6px;
    border-radius: var(--radius);
}

footer.site-footer {
    text-align: center;
    color: var(--muted-2);
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 56px 0;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}
