:root {
    --gov-primary: #0b57b7;
    --gov-primary-hover: #084690;
    --gov-primary-soft: #eaf2fb;
    --gov-page: #f4f6f8;
    --gov-surface: #ffffff;
    --gov-surface-muted: #f8f9fa;
    --gov-border: #d9dee5;
    --gov-text: #25313d;
    --gov-text-muted: #66717d;
    --gov-shadow: 0 8px 24px rgb(22 34 48 / 10%);
}

/*
 * Matomo renders fatal errors, maintenance screens, and the database updater
 * outside the regular application layout. Keep these pages aligned with the
 * Gov Analytics theme without changing Matomo's vendor templates.
 */
body#simple {
    min-height: 100vh;
    margin: 0;
    background: var(--gov-page) !important;
    color: var(--gov-text);
    font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#simple > .logo,
#simple > #logo {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 88px;
    margin: 0;
    padding: 16px 24px;
    background: var(--gov-surface) !important;
    border-bottom: 1px solid var(--gov-border);
    box-shadow: 0 1px 3px rgb(22 34 48 / 8%);
}

#simple > .logo a,
#simple > #logo a {
    display: flex;
    align-items: center;
    justify-content: center;
}

#simple > .logo img,
#simple > #logo img {
    width: 224px !important;
    height: 56px !important;
    max-height: 56px !important;
    object-fit: contain;
}

#simple .box {
    box-sizing: border-box;
    width: calc(100% - 48px);
    max-width: 880px;
    margin: 64px auto;
    overflow: hidden;
    background: var(--gov-surface);
    border: 1px solid var(--gov-border);
    border-radius: 8px;
    box-shadow: var(--gov-shadow);
}

#simple .box .header {
    padding: 32px 48px;
    background: var(--gov-surface-muted);
    border-bottom: 1px solid var(--gov-border);
    text-align: center;
}

#simple .box .header h1 {
    margin: 0;
    color: var(--gov-text);
    font-size: 30px;
    font-weight: 500;
    line-height: 1.25;
}

#simple .box .content {
    margin: 0;
    padding: 40px 56px;
    color: var(--gov-text);
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

#simple .box .content h2 {
    margin: 0 0 28px;
    color: var(--gov-text);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
}

#simple .box .content p {
    padding: 0;
}

#simple .box .content ul {
    width: min(100%, 560px);
    margin: 28px auto 0;
    color: var(--gov-text-muted);
    text-align: left;
}

#simple .box .footer {
    padding: 20px 32px;
    background: var(--gov-surface-muted);
    border-top: 1px solid var(--gov-border);
    text-align: center;
}

#simple a,
#installation a {
    color: var(--gov-primary);
}

#simple a:hover,
#simple a:focus,
#installation a:hover,
#installation a:focus {
    color: var(--gov-primary-hover);
}

/* The interactive installer has another independent layout and CSS bundle. */
body#installation {
    min-height: 100vh;
    background: var(--gov-page);
    color: var(--gov-text);
}

#installation > .container {
    box-sizing: border-box;
    width: calc(100% - 48px) !important;
    max-width: 1200px;
    margin: 40px auto;
    padding: 32px;
    background: var(--gov-surface);
    border: 1px solid var(--gov-border);
    border-radius: 8px;
    box-shadow: var(--gov-shadow);
}

#installation .header {
    margin-bottom: 32px;
    padding: 0 0 24px;
    border-bottom-color: var(--gov-border);
}

#installation .logo img {
    width: 192px;
    max-height: 48px;
    object-fit: contain;
}

#installation .logo p,
#installation .content p,
#installation .form-group label {
    color: var(--gov-text-muted);
}

#installation .list-group-item {
    border-color: var(--gov-border);
}

#installation .list-group-item.active,
#installation .progress .progress-bar,
#installation .btn {
    background: var(--gov-primary) !important;
}

#installation .btn:hover,
#installation .btn:focus {
    background: var(--gov-primary-hover) !important;
}

/* The updater can render the upstream donation form outside the widget list. */
#donate-form-container,
.piwik-donate-call {
    display: none !important;
}

@media (max-width: 640px) {
    #simple > .logo,
    #simple > #logo {
        min-height: 72px;
        padding: 12px 20px;
    }

    #simple > .logo img,
    #simple > #logo img {
        width: 192px !important;
        height: 48px !important;
    }

    #simple .box {
        width: calc(100% - 32px);
        margin: 32px auto;
    }

    #simple .box .header,
    #simple .box .content,
    #simple .box .footer {
        padding-right: 24px;
        padding-left: 24px;
    }

    #simple .box .header h1 {
        font-size: 26px;
    }

    #installation > .container {
        width: calc(100% - 32px) !important;
        margin: 24px auto;
        padding: 24px;
    }
}
