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

:root {
    --bg: #fafafa;
    --text: #1a1a1a;
    --muted: #555;
    --accent: #e02424;
    --border: #ddd;
    --chat-bg: #fff;
    --max-width: 1100px;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 1.0625rem;
}

main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

/* Hero */

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: clamp(2.75rem, 9vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 1.25rem;
    color: var(--muted);
}

.crossed-out {
    position: relative;
    display: inline-block;
}

.crossed-out::after {
    content: "";
    position: absolute;
    left: -6%;
    top: 50%;
    width: 112%;
    height: 0.1em;
    background: var(--accent);
    transform: translateY(-50%);
}

.cursor {
    animation: blink 1s step-end infinite;
    color: var(--muted);
    font-weight: 300;
}

@keyframes blink {
    50% { opacity: 0; }
}

/* Sections */

section {
    margin-bottom: 3rem;
}

.intro .lead {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.intro p + p {
    margin-top: 0.75rem;
}

.emphasis {
    font-weight: 600;
    margin-top: 1rem;
}

/* Examples */

.example h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.example-pair {
    margin-bottom: 2.5rem;
}

.example-pair:last-child {
    margin-bottom: 0;
}

.example-pair h3 {
    font-size: 1.05rem;
    margin: 0 0 1rem;
}

.example-pair h3.bad { color: var(--accent); }
.example-pair h3.good { color: #1a7f37; }

.example-aside .ambig {
    margin-top: 1.5rem;
}

.example-aside .ambig h2 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.example-aside .ambig .term dt {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.example-aside .aside-punchline {
    margin-top: 1.25rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.example-aside .ambig .term:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .example-pair {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto 1fr;
        column-gap: 2rem;
        row-gap: 1rem;
        align-items: start;
    }

    .example-pair h3 {
        grid-column: 1;
        grid-row: 1;
    }

    .example-pair .chat {
        grid-column: 1;
        grid-row: 2;
    }

    .example-pair .example-aside,
    .example-pair > .note {
        grid-column: 2;
        grid-row: 2;
    }

    .example-pair .example-aside .note,
    .example-pair > .note {
        margin-top: 0;
    }
}

.chat {
    background: var(--chat-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0;
}

.message + .message {
    border-top: 1px solid #f0f0f0;
}

.avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 0;
    object-fit: cover;
}

.message-body {
    flex: 1;
    min-width: 0;
}

.message-header {
    line-height: 1.3;
}

.sender {
    font-weight: 700;
    margin-right: 0.5rem;
}

.time {
    font-size: 0.85rem;
    color: var(--muted);
}

.message p {
    margin-top: 0.15rem;
}

.note {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Ambiguity */

.ambig h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.term {
    margin-bottom: 1.25rem;
}

.term dt {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.term dd {
    color: var(--muted);
    padding-left: 1rem;
}

.term dd::before {
    content: "→ ";
    color: var(--border);
}

/* Rules */

.rules h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.rules ul {
    list-style: none;
    padding: 0;
}

.rules li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.rules li:last-child {
    border-bottom: none;
}

/* Exceptions */

.exceptions h2 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.exceptions p + p {
    margin-top: 0.75rem;
}

/* Closing */

.closing {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.closing .emphasis {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.closing p:last-child {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.attribution {
    margin-top: 3rem;
    padding-bottom: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
}

.attribution a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.attribution a:hover {
    color: var(--text);
}