:root {
    --pico-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.hero { padding: 2.5rem 0 3.5rem; }
.hero h1 { font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.5rem; }

/* --- карточки проектов --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.project-card { margin-bottom: 0; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.project-card:hover { transform: translateY(-3px); box-shadow: var(--pico-box-shadow); }
.project-card p { margin-bottom: 0.5rem; }
.project-card small { display: block; color: var(--pico-muted-color); margin-bottom: 0.25rem; }

/* --- контент страниц: заголовки в меру крупные, не как дефолтные гиганты Pico --- */
.project-content h1, .ql-editor h1 { font-size: 1.7em; }
.project-content h2, .ql-editor h2 { font-size: 1.35em; }
.project-content h3, .ql-editor h3 { font-size: 1.15em; }
.project-content h1, .project-content h2, .project-content h3 { margin-top: 1.4em; margin-bottom: 0.4em; }
.project-content img { max-width: 100%; height: auto; border-radius: 0.5rem; }

/* --- кнопки-ссылки --- */
a.btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1.25rem;
    border: 1px solid var(--pico-primary-border);
    border-radius: var(--pico-border-radius);
    color: var(--pico-primary);
    text-decoration: none;
    font-weight: 500;
}
a.btn:hover {
    background: var(--pico-primary);
    color: var(--pico-contrast-inverse);
    border-color: var(--pico-primary);
}

/* кнопки в формах — по ширине содержимого, а не на весь экран */
form button[type="submit"] { width: auto; }

/* --- админка: компактные стрелки и кнопки в таблице --- */
td form { display: inline; margin-bottom: 0; }
td button { margin-bottom: 0; padding: 0.25rem 0.6rem; font-size: 0.85rem; }

.flash { color: #b45309; }

/* --- компактный режим --- */
html { font-size: 15px; }  /* ужимает всё сразу: шрифты, отступы, заголовки */

h1 { font-size: 1.6rem; margin-bottom: 0.75rem; }
h2 { font-size: 1.3rem; margin-bottom: 0.6rem; }
h3 { font-size: 1.1rem; }

button, [type="submit"], [type="reset"], [type="button"] {
    padding: 0.4rem 0.9rem;
    font-size: 0.9rem;
}


/* --- редактор: база, оформление берёт на себя quill.snow.css --- */
#editor { min-height: 220px; }
.ql-editor { font-size: 1rem; }
.ql-editor img { max-width: 100%; height: auto; }
.ql-editor h1 { font-size: 1.7em; }
.ql-editor h2 { font-size: 1.35em; }
.ql-editor h3 { font-size: 1.15em; }

/* --- пикеры Quill: снимаем кнопочные стили Pico (они висят на role=button) --- */
.ql-toolbar [role="button"],
.ql-toolbar select {
    background: transparent;
    border: none;
    box-shadow: none;
    height: auto;
    min-height: 0;
    width: auto;
    padding: 2px 6px;
    margin: 0 2px;
    color: var(--pico-color);
    font-size: 13px;
    line-height: normal;
}
.ql-toolbar [role="button"] * {
    color: inherit;
    line-height: normal;
}
.ql-toolbar [role="button"]:hover,
.ql-toolbar [role="button"]:focus,
.ql-toolbar [role="button"]:active {
    background: transparent;
    color: var(--pico-color);
    box-shadow: none;
    border: none;
}
.ql-toolbar .ql-picker-label { padding-right: 18px; }

/* --- фикс цвета пикеров: внутри [role=button] Pico переопределяет
       переменную --pico-color в белый, поэтому var() там давал белый текст --- */
.ql-toolbar [role="button"],
.ql-toolbar [role="button"]:hover,
.ql-toolbar [role="button"]:focus,
.ql-toolbar [role="button"]:active,
.ql-toolbar [role="button"] * {
    color: inherit;
}
