/* Sole Autosite — base stylesheet */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #222;
    background: #fafafa;
}

/* Site header */

.site-header {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #ddd;
    margin-bottom: 2rem;
}

.site-header__logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
}

/* Site navigation (two-tier) */

.site-nav {
    margin-top: 0.75rem;
}

.site-nav__tier {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 0.75rem;
    list-style: none;
    font-size: 0.9rem;
}

.site-nav__tier--current {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
}

.site-nav__link {
    color: #1a6fb5;
    text-decoration: none;
}

.site-nav__link:hover {
    text-decoration: underline;
}

.site-nav__link--active {
    font-weight: 600;
}

.site-nav__item--dir .site-nav__link::after {
    content: "/";
    color: #aaa;
    font-weight: normal;
    margin-left: 1px;
}

.site-nav__up {
    color: #888;
    font-size: 0.8rem;
}

/* Site main */

.site-main {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    min-height: 60vh;
    padding-bottom: 3rem;
}

/* Site footer */

.site-footer {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1.5rem;
    border-top: 1px solid #ddd;
    margin-top: 2rem;
}

.site-footer__text {
    color: #888;
    font-size: 0.85rem;
}

/* Article (text, image pages) */

.article__title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.article__date {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.article__body p {
    margin-bottom: 1rem;
}

/* Home page */

.home__intro {
    margin-bottom: 2.5rem;
}

.home__intro p {
    margin-bottom: 1rem;
}

.home__heading {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Gallery / folder pages */

.gallery__title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.gallery__intro {
    margin-bottom: 2rem;
}

.gallery__intro p {
    margin-bottom: 1rem;
}

.gallery__empty {
    color: #888;
}

/* Listing (reusable block — used in home and gallery) */

.listing {
    list-style: none;
}

.listing__item {
    padding: 0.4rem 0;
    border-bottom: 1px solid #eee;
}

.listing__link {
    color: #1a6fb5;
    text-decoration: none;
}

.listing__link:hover {
    text-decoration: underline;
}

.listing__date {
    color: #888;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.listing__dir-marker {
    color: #888;
    font-size: 0.85rem;
}

/* Image page */

.image__title {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.image__date {
    display: block;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.image__description {
    margin-bottom: 1.5rem;
    color: #555;
}

.image__figure {
    margin-bottom: 1.5rem;
}

.image__img {
    max-width: 100%;
    height: auto;
    display: block;
}

.image__body {
    margin-top: 1.5rem;
}

.image__body p {
    margin-bottom: 1rem;
}

/* Links (global defaults) */

a {
    color: #1a6fb5;
}

a:hover {
    color: #124d80;
}

/* Search results */

.search__title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.search__query {
    margin-bottom: 1.5rem;
    color: #555;
}

.search__empty {
    color: #888;
}

.search__list {
    list-style: none;
}

.search__item {
    padding: 0.4rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.search__link {
    color: #1a6fb5;
    text-decoration: none;
}

.search__link:hover {
    text-decoration: underline;
}

.search__type {
    font-size: 0.8rem;
    color: #888;
}

/* Admin panel */

.admin-header {
    max-width: 48rem;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header__logo {
    font-weight: 600;
    color: #222;
    text-decoration: none;
}

.admin-header__nav {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.admin-main {
    max-width: 48rem;
    margin: 1.5rem auto;
    padding: 0 1.5rem;
}

.admin-setup__error,
.admin-login .error {
    color: #b00;
    margin-bottom: 1rem;
}

.admin-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: #888;
}

.admin-breadcrumb__link {
    color: #1a6fb5;
    text-decoration: none;
}

.admin-files {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.admin-files th,
.admin-files td {
    text-align: left;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid #eee;
}

.admin-files th {
    font-weight: 600;
    border-bottom-color: #ccc;
}

.admin-files__inline-form {
    display: inline;
}

.admin-files__rename-input {
    width: 10rem;
    font-size: 0.85rem;
    padding: 0.15rem 0.3rem;
}

.admin-dashboard__message,
.admin-config__message {
    padding: 0.5rem;
    background: #eef6ee;
    border: 1px solid #bdb;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.admin-upload,
.admin-mkdir {
    margin-top: 2rem;
}

.admin-config label,
.admin-setup label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-config input[type="text"],
.admin-config input[type="number"],
.admin-config textarea {
    width: 100%;
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
}

.admin-config button,
.admin-setup button,
.admin-upload button,
.admin-mkdir button,
.admin-login button {
    margin-top: 1rem;
    padding: 0.4rem 1rem;
    cursor: pointer;
}

.admin-editor textarea {
    width: 100%;
    font-family: monospace;
    font-size: 0.9rem;
    padding: 0.5rem;
}
