/* ── Theme variables ──────────────────────────────────────── */
:root {
    --accent: rgb(0, 125, 77);
    --header-h: 56px;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
    color: #333;
    background: #fff;
    line-height: 1.7;
}

a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Top bar ──────────────────────────────────────────────── */
.site-top-bar {
    height: 2ex;
    background: var(--accent);
}

/* ── Banner ───────────────────────────────────────────────── */
.site-banner {
    width: 100%;
    height: 115px;
    overflow: hidden;
    display: block;
    line-height: 0;
}

.site-banner img {
    width: 100%;
    height: 115px;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* ── Nav header ───────────────────────────────────────────── */
.site-header {
    background: var(--accent);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,.4);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    min-height: var(--header-h);
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
}
.site-title:hover { text-decoration: none; color: #ddd; }

/* Hamburger — hidden on desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
    padding: .25rem .5rem;
}

/* ── Two-column body ──────────────────────────────────────── */
.site-body {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - var(--header-h) - 60px);
}

/* ── Sidebar ──────────────────────────────────────────────── */
.side-nav {
    width: 200px;
    flex-shrink: 0;
    background: #f5f5f5;
    border-right: 1px solid #e0e0e0;
}

.side-nav-inner {
    position: sticky;
    top: var(--header-h);
    padding: 1.5rem 0;
    overflow-y: auto;
    max-height: calc(100vh - var(--header-h));
}

.side-nav-heading {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #999;
    padding: .75rem 1.25rem .25rem;
    margin: 0;
}

.side-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.side-nav ul li a {
    display: block;
    padding: .4rem 1.25rem;
    color: #444;
    font-size: .9rem;
    transition: background .1s, color .1s;
}

.side-nav ul li a:hover {
    background: #e8e8e8;
    color: #111;
    text-decoration: none;
}

.side-nav ul li a.active {
    background: #e0e0e0;
    color: #111;
    font-weight: 600;
}

/* ── Content ──────────────────────────────────────────────── */
.site-content { flex: 1; min-width: 0; }

.content-inner {
    max-width: 800px;
    padding: 2rem 1.5rem 3rem;
}

/* Offset anchor targets so sticky nav doesn't cover them */
:target, [id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

/* ── App page typography ──────────────────────────────────── */
.app-page h1 { font-size: 2rem; margin-bottom: 1rem; color: #111; }
.app-page h2 { font-size: 1.5rem; margin: 2rem 0 .75rem; color: #222; border-bottom: 1px solid #e5e5e5; padding-bottom: .3rem; }
.app-page h3 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; color: #333; }
.app-page h4 { font-size: 1rem; margin: 1.25rem 0 .4rem; color: #444; }

.app-page p { margin-bottom: 1rem; }

.app-page ul, .app-page ol {
    margin: 0 0 1rem 1.5rem;
}
.app-page li { margin-bottom: .3rem; }

.app-page strong { color: #111; }

.app-page hr {
    border: none;
    border-top: 1px solid #e5e5e5;
    margin: 2.5rem 0;
}

.app-page img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem 0;
    border-radius: 4px;
}

/* App Store badge */
.store-badge {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.store-badge img {
    width: 160px;
    display: block;
}

/* Screenshot — float right on wide screens */
.app-page .screenshot {
    float: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 200px;
    clear: right;
    border: 1px solid #ddd;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    background: #fff;
}

@media (max-width: 600px) {
    .app-page .screenshot { float: none; max-width: 160px; margin: 1rem 0; }
}

/* ── Home page ────────────────────────────────────────────── */
.home-page h1 { font-size: 2rem; margin-bottom: .5rem; }
.home-page h2 { font-size: 1.3rem; margin: 1.75rem 0 .75rem; color: #222; }
.home-page p  { margin-bottom: 1rem; }
.app-list { list-style: none; margin: 0 0 1rem; }
.app-list li { padding: .4rem 0; border-bottom: 1px solid #f0f0f0; }
.app-list li:last-child { border-bottom: none; }

/* ── Support form ─────────────────────────────────────────── */
.support-form { margin-top: 1.5rem; }
.support-form h3 { font-size: 1.2rem; margin-bottom: 1rem; }

.support-form label {
    display: block;
    font-weight: 600;
    margin-bottom: .25rem;
    font-size: .9rem;
    color: #444;
}

.support-form input[type="text"],
.support-form input[type="email"],
.support-form textarea {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color .15s;
}
.support-form input:focus,
.support-form textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,.15);
}

.support-form textarea { resize: vertical; }

.support-form p { margin-bottom: .85rem; }

.support-form button[type="submit"] {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: .6rem 1.5rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s;
}
.support-form button[type="submit"]:hover { background: #333; }

.form-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}
.form-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    background: #1a1a1a;
    color: #aaa;
    font-size: .85rem;
    height: 60px;
    display: flex;
    align-items: center;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 700px) {
    .nav-toggle { display: block; }

    .site-body { display: block; }

    .side-nav {
        display: none;
        position: static;
        width: 100%;
        min-height: 0;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    .side-nav.open { display: block; }
}
