@font-face {
    font-family: "OpenDyslexic";
    src: url("/static/fonts/OpenDyslexic-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "OpenDyslexic";
    src: url("/static/fonts/OpenDyslexic-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

:root {
    --bg: #faf3e0;
    --surface: #ffffff;
    --text: #2b2b2b;
    --accent: #5b7f9e;
    --accent-contrast: #ffffff;
    --border: #e3d9bf;
    --highlight: #ffe08a;
}

[data-theme="cielo"] {
    --bg: #e8f1fb;
    --surface: #ffffff;
    --text: #22303d;
    --accent: #3f6f8f;
    --accent-contrast: #ffffff;
    --border: #cfe0ee;
    --highlight: #ffe08a;
}

[data-theme="noche"] {
    --bg: #23262b;
    --surface: #2e3238;
    --text: #ecebe8;
    --accent: #e0b04f;
    --accent-contrast: #23262b;
    --border: #40444b;
    --highlight: #e0b04f;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "OpenDyslexic", sans-serif;
    font-size: 19px;
    line-height: 1.9;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 40px;
    max-width: 720px;
    width: 100%;
    margin-bottom: 32px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

h1, h2 {
    letter-spacing: 0.02em;
    margin-top: 0;
}

label {
    display: block;
    margin: 20px 0 8px;
    font-weight: 700;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.8;
}

textarea {
    min-height: 260px;
    resize: vertical;
}

button, .btn {
    display: inline-block;
    margin-top: 24px;
    padding: 14px 28px;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-contrast);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

button:hover, .btn:hover {
    filter: brightness(1.08);
}

.error {
    color: #b03a3a;
    font-weight: 700;
    margin-top: 12px;
}

.theme-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
}

.theme-switch button {
    margin: 0;
    padding: 8px 18px;
    font-size: 0.85rem;
}

.reader-word {
    transition: background-color 0.1s ease;
    border-radius: 4px;
    padding: 0 2px;
}

.reader-word.active {
    background-color: var(--highlight);
}

.doc-list a {
    display: block;
    padding: 12px 0;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid var(--border);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 720px;
    width: 100%;
    margin-bottom: 12px;
}

.top-bar a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}
