/* slop.at - Clean, readable typography with entity highlighting */

* {
    margin: 0;
    padding: 0;
}

:root {
    --bg: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666666;
    --link: #0066cc;
    --link-hover: #0052a3;
    --entity-person: #ef4444;
    --entity-organization: #8b5cf6;
    --entity-place: #3b82f6;
    --entity-event: #10b981;
    --entity-topic: #f59e0b;
    --entity-definedterm: #ec4899;
    --entity-activity: #0891b2;
    --entity-company: #6366f1;
    --entity-meeting: #06b6d4;
    --entity-conference: #a855f7;
    --entity-family: #db2777;
    --entity-community: #65a30d;
    --entity-default: #fbbf24;
}

body {
    font-family: "American Typewriter", "Courier New", monospace;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    padding: 0;
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Landing page */
h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

/* Slop article */
.slop {
    margin: 0;
}

/* YAML frontmatter at bottom */
.frontmatter {
    margin-top: 2rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid #e5e5e5;
    font-size: 0.95rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

.frontmatter pre {
    margin: 0;
    padding: 0;
    background: #ffffff !important;
    border: none;
    font-family: "Courier New", monospace;
    font-size: inherit;
    line-height: 1.4;
}

.slop h1 {
    font-size: 2.5rem;
    margin: 0.5rem 0 1.5rem 0;
    line-height: 1.2;
}

.slop h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.slop h3 {
    font-size: 1.375rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.slop p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.0625rem;
}

.slop ul,
.slop ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.slop li {
    margin-bottom: 0.5rem;
}

.slop blockquote {
    border-left: 3px solid var(--text-secondary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.slop code {
    background: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    font-family: "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

.slop pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.slop pre code {
    background: none;
    padding: 0;
}

.slop a {
    color: var(--link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.slop a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

/* Entity highlighting */
mark.entity {
    background: var(--entity-default);
    color: white;
    padding: 0.1em 0.2em;
    border-radius: 2px;
    cursor: help;
}

mark.entity-person {
    background: var(--entity-person);
    color: white;
}

mark.entity-organization {
    background: var(--entity-organization);
    color: white;
}

mark.entity-place {
    background: var(--entity-place);
    color: white;
}

mark.entity-event {
    background: var(--entity-event);
    color: white;
}

mark.entity-topic {
    background: var(--entity-topic);
    color: white;
}

mark.entity-definedterm {
    background: var(--entity-definedterm);
    color: white;
}

mark.entity-activity {
    background: var(--entity-activity);
    color: white;
}

mark.entity-company {
    background: var(--entity-company);
    color: white;
}

mark.entity-meeting {
    background: var(--entity-meeting);
    color: white;
}

mark.entity-conference {
    background: var(--entity-conference);
    color: white;
}

mark.entity-family {
    background: var(--entity-family);
    color: white;
}

mark.entity-community {
    background: var(--entity-community);
    color: white;
}

mark.entity:not([class*="entity-"]) {
    background: var(--entity-default);
    color: white;
}

mark.entity:hover {
    opacity: 1 !important;
}

/* Metadata */
.metadata {
    margin-top: 3rem;
    padding-top: 2rem;
}

.metadata hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin-bottom: 1.5rem;
}

.metadata dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.metadata dt {
    font-weight: 600;
    text-align: right;
}

.metadata dd {
    margin: 0;
}

/* Footer */
footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
}

footer a:hover {
    color: var(--link);
}

/* Mobile responsive */
@media (max-width: 640px) {
    body {
        padding: 1rem 0.75rem;
    }

    h1 {
        font-size: 2rem;
    }

    .slop h1 {
        font-size: 1.875rem;
    }

    .slop h2 {
        font-size: 1.5rem;
    }

    .slop h3 {
        font-size: 1.25rem;
    }

    .slop p {
        font-size: 1rem;
    }
}
