/* Styled once, plainly. A public page's markup should be the owner's own: no component library,
   because every component in one needs interactivity to do anything and static SSR deliberately
   does not give them any. */

:root {
    --ink: #16181d;
    --muted: #5b6270;
    --line: #e2e5ea;
    --accent: #1f5fbf;
    --page: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        --ink: #e8eaee;
        --muted: #9aa3b2;
        --line: #2a2e37;
        --accent: #7aa7f0;
        --page: #14161a;
    }
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif;
}

header.site, footer.site {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--line);
}

footer.site { border-bottom: 0; border-top: 1px solid var(--line); }

header.site nav { display: flex; align-items: center; gap: 1rem; }

.brand { font-weight: 600; text-decoration: none; color: inherit; }

main { max-width: 46rem; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 .75rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 .5rem; }

p.lead { font-size: 1.1rem; color: var(--muted); }
p.note, span.optional { color: var(--muted); font-size: .9rem; }

a { color: var(--accent); }

ul.demos { list-style: none; padding: 0; display: grid; gap: 2rem; }
ul.demos > li { border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; }
ul.demos img { width: 100%; border-radius: 6px; margin-bottom: .75rem; }
ul.demos h2 { margin-top: 0; }

img { max-width: 100%; height: auto; }

a.open, button[type="submit"], a.provider {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border: 0;
    border-radius: 6px;
    padding: .6rem 1.1rem;
    font: inherit;
    cursor: pointer;
}

.unavailable { color: var(--muted); }

button.link {
    background: none; border: 0; padding: 0;
    color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline;
}

form label { display: block; margin: 1.25rem 0; font-weight: 600; }
form input[type="text"], form select { display: block; width: 100%; margin-top: .35rem; padding: .55rem; font: inherit;
    border: 1px solid var(--line); border-radius: 6px; background: var(--page); color: var(--ink); }
label.consent { font-weight: 400; display: flex; gap: .6rem; align-items: flex-start; }
label.consent input { margin-top: .35rem; }

.validation-message { color: #b3261e; font-weight: 400; font-size: .9rem; }

dl dt { font-weight: 600; margin-top: .75rem; }
dl dd { margin: 0; }
code { background: rgba(127,127,127,.15); padding: .15rem .35rem; border-radius: 4px; }

/* ---------------------------------------------------------------- the owner's side.

   Visibly different from the public pages, on purpose: these hold every e-mail address and every
   note written about a person, and "am I looking at the site or at the lead list" should never be
   a question somebody has to answer by reading the content. */

header.site.admin { background: var(--ink); color: var(--page); border-bottom: 0; }
header.site.admin a, header.site.admin button.link { color: var(--page); }

main.wide { max-width: 76rem; }

.filters { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.5rem; }
.filters input[type="search"], .filters select {
    padding: .45rem .6rem; font: inherit; border: 1px solid var(--line);
    border-radius: 6px; background: var(--page); color: var(--ink);
}
.filters label.inline { display: inline-flex; align-items: center; gap: .35rem; font-weight: 400; margin: 0; }
.filters a.export { margin-left: auto; }

p.count { color: var(--muted); font-size: .9rem; }

table.leads { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.leads th, table.leads td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
table.leads th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.leads tr.blocked { opacity: .55; }
table.leads td.due { color: #b3261e; font-weight: 600; }

.said { color: var(--muted); font-size: .8rem; margin-left: .35rem; }

.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
@media (max-width: 60rem) { .two-columns { grid-template-columns: 1fr; } }

.owner-record { border-left: 1px solid var(--line); padding-left: 2rem; }
@media (max-width: 60rem) { .owner-record { border-left: 0; padding-left: 0; } }

p.crumb { margin: 0 0 1rem; }
p.warning { background: rgba(179,38,30,.12); padding: .6rem .8rem; border-radius: 6px; }

blockquote { margin: .4rem 0 0; padding-left: .8rem; border-left: 2px solid var(--line);
    color: var(--muted); font-size: .9rem; }

ol.notes { list-style: none; padding: 0; }
ol.notes li { border-top: 1px solid var(--line); padding: .75rem 0; }
ol.notes time { color: var(--muted); font-size: .85rem; }
ol.notes p { margin: .25rem 0 0; white-space: pre-wrap; }

form textarea { width: 100%; padding: .55rem; font: inherit; border: 1px solid var(--line);
    border-radius: 6px; background: var(--page); color: var(--ink); }

button.secondary { background: var(--muted); }
label.danger, button.danger { color: #b3261e; }
button.danger { background: transparent; border: 1px solid #b3261e; }
