
/*
 * Claude Medium for Known
 * Warm, quiet, writing-first visual system.
 */

:root {
    --cm-bg: #f7f5f2;
    --cm-surface: #ffffff;
    --cm-surface-soft: #f1eee9;
    --cm-text: #24211f;
    --cm-text-soft: #5f5954;
    --cm-muted: #857d76;
    --cm-border: #ded8d1;
    --cm-accent: #d97757;
    --cm-accent-dark: #b95f43;
    --cm-accent-soft: #f3ddd4;
    --cm-shadow: 0 10px 35px rgba(49, 39, 31, .07);
    --cm-radius: 12px;
    --cm-content: 760px;
    --cm-wide: 1120px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --cm-bg: #1e1d1b;
        --cm-surface: #262421;
        --cm-surface-soft: #302d29;
        --cm-text: #f2eee9;
        --cm-text-soft: #c7c0b8;
        --cm-muted: #9e968e;
        --cm-border: #45403a;
        --cm-accent: #e58a6a;
        --cm-accent-dark: #f0a184;
        --cm-accent-soft: #46322b;
        --cm-shadow: 0 10px 35px rgba(0,0,0,.22);
    }
}

html {
    background: var(--cm-bg);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cm-bg);
    color: var(--cm-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body, input, textarea, button, select {
    color: var(--cm-text);
}

a {
    color: inherit;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--cm-accent-dark);
}

img {
    max-width: 100%;
    height: auto;
}

.site, .container, .content, .page, main {
    box-sizing: border-box;
}

header, nav, footer {
    border-color: var(--cm-border);
}

/* Quiet, Medium-like top bar */
header {
    background: color-mix(in srgb, var(--cm-bg) 92%, transparent);
    border-bottom: 1px solid var(--cm-border);
    backdrop-filter: blur(14px);
}

header a {
    text-decoration: none;
}

nav a, .navigation a, .nav a {
    font-size: .92rem;
    font-weight: 500;
}

/* Give common Known content wrappers a comfortable reading width. */
main, .main, .content, .page, .container {
    max-width: var(--cm-wide);
    margin-left: auto;
    margin-right: auto;
}

/* Reading typography */
article, .h-entry, .entry, .content-body, .prose, .note {
    color: var(--cm-text);
}

article p, .h-entry p, .entry p, .content-body p, .prose p {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.18rem;
    line-height: 1.78;
    letter-spacing: -.005em;
}

article h1, .h-entry h1, .entry h1,
article h2, .h-entry h2, .entry h2,
article h3, .h-entry h3, .entry h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.18;
    color: var(--cm-text);
}

article h1, .h-entry h1, .entry h1 {
    font-size: clamp(2.2rem, 5vw, 3.65rem);
    margin-bottom: .5em;
}

article h2, .h-entry h2, .entry h2 {
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    margin-top: 1.8em;
}

article h3, .h-entry h3, .entry h3 {
    font-size: 1.55rem;
    margin-top: 1.5em;
}

article blockquote, .h-entry blockquote, .entry blockquote {
    margin: 2rem 0;
    padding: .5rem 1.5rem;
    border-left: 3px solid var(--cm-accent);
    color: var(--cm-text-soft);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
}

article code, .h-entry code, .entry code, pre {
    background: var(--cm-surface-soft);
    border-radius: 6px;
}

pre {
    padding: 1rem 1.15rem;
    overflow-x: auto;
    border: 1px solid var(--cm-border);
}

/* Cards and stream items */
article, .h-entry, .entry {
    background: var(--cm-surface);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    box-shadow: var(--cm-shadow);
}

article, .h-entry {
    padding: clamp(1.35rem, 4vw, 3rem);
}

article + article, .h-entry + .h-entry, .entry + .entry {
    margin-top: 1.25rem;
}

.summary, .excerpt, .description {
    color: var(--cm-text-soft);
}

/* Metadata */
.published, .date, .timestamp, .metadata, .meta {
    color: var(--cm-muted);
    font-size: .88rem;
}

.author, .p-author {
    font-weight: 600;
}

/* Buttons */
button, input[type="submit"], .button, .btn {
    border: 1px solid var(--cm-border);
    border-radius: 999px;
    background: var(--cm-surface);
    color: var(--cm-text);
    padding: .55rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

button:hover, input[type="submit"]:hover, .button:hover, .btn:hover {
    border-color: var(--cm-accent);
    background: var(--cm-accent-soft);
    transform: translateY(-1px);
}

.button.primary, .btn-primary, button.primary {
    background: var(--cm-accent);
    border-color: var(--cm-accent);
    color: #fff;
}

.button.primary:hover, .btn-primary:hover, button.primary:hover {
    background: var(--cm-accent-dark);
    border-color: var(--cm-accent-dark);
}

/* Forms */
input, textarea, select {
    box-sizing: border-box;
    max-width: 100%;
    background: var(--cm-surface);
    border: 1px solid var(--cm-border);
    border-radius: 8px;
    padding: .7rem .8rem;
}

textarea {
    min-height: 180px;
}

input:focus, textarea:focus, select:focus {
    outline: 2px solid color-mix(in srgb, var(--cm-accent) 35%, transparent);
    border-color: var(--cm-accent);
}

/* Tags */
.tag, .tags a, .tag a {
    display: inline-block;
    background: var(--cm-accent-soft);
    color: var(--cm-accent-dark);
    border-radius: 999px;
    padding: .25rem .65rem;
    font-size: .8rem;
    text-decoration: none;
}

/* Images inside posts */
article .photo, .h-entry .photo,
article figure, .h-entry figure {
    margin: 2rem 0;
}

article figure img, .h-entry figure img {
    border-radius: 8px;
}

article figcaption, .h-entry figcaption {
    color: var(--cm-muted);
    text-align: center;
    font-size: .85rem;
    margin-top: .55rem;
}

/* Footer */
footer {
    max-width: var(--cm-wide);
    margin: 4rem auto 0;
    padding: 2rem 1rem 3rem;
    color: var(--cm-muted);
    border-top: 1px solid var(--cm-border);
    font-size: .9rem;
}

/* Mobile */
@media (max-width: 720px) {
    body { font-size: 15px; }
    article, .h-entry { padding: 1.1rem; border-radius: 8px; }
    article p, .h-entry p, .entry p, .content-body p, .prose p {
        font-size: 1.08rem;
        line-height: 1.72;
    }
    article h1, .h-entry h1, .entry h1 {
        font-size: 2.2rem;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
