"""Default template — clean sans-serif layout."""

from nhandu.templates import Template, register

CSS = """
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    color: #333;
    background: #fff;
}
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #1a1a1a;
}
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
a { color: #0969da; text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 1em 0; }
pre {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}
code {
    background: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}
pre code {
    background: none;
    padding: 0;
}
table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}
th, td {
    border: 1px solid #ddd;
    padding: 0.5rem 0.75rem;
    text-align: left;
}
th {
    background: #f5f5f5;
    font-weight: 600;
}
blockquote {
    border-left: 4px solid #ddd;
    margin: 1em 0;
    padding: 0.5em 1em;
    color: #555;
}
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 2em 0;
}
img {
    max-width: 100%;
    height: auto;
}
.code-block {
    margin: 1.5rem 0;
}
.code-input {
    padding: 1rem;
    border-radius: 4px 4px 0 0;
    margin: 0;
}
.code-input pre {
    margin: 0;
    padding: 0;
    background: transparent;
}
.code-output {
    background: #f8f8f8;
    border: 1px solid #e1e4e8;
    border-top: none;
    padding: 1rem;
    border-radius: 0 0 4px 4px;
    margin: 0;
}
.error {
    color: #d73a49;
    background: #ffeef0;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #ffdce0;
}
.nhandu-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e4e8;
    font-size: 0.875rem;
    color: #6c757d;
}
.nhandu-footer a {
    color: #0969da;
    text-decoration: none;
}
.nhandu-footer a:hover {
    text-decoration: underline;
}
"""

register(Template(name="default", description="Clean sans-serif layout", css=CSS))
