body {
    margin: 0;
    font-family: system-ui, sans-serif;
    color: #202124;
}

header {
    background-color: #0C2340;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 20px;
}

/* Nav bar */

.nav-bar {
    width: 100%;
    max-width: 700px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 0;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 13px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    text-underline-offset: 4px;
}

.nav-links a:hover,
.nav-links a:active {
    text-decoration: underline;
}

.nav-links .nav-text {
    color: rgba(255, 255, 255, 0.55);
    cursor: default;
}

.back-to-search {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.back-to-main {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    text-underline-offset: 4px;
    white-space: nowrap;
}

.back-to-main:hover,
.back-to-main:active {
    text-decoration: underline;
}

header .logo {
    width: 100%;
    max-width: 240px;
    height: auto;
    display: block;
    margin-top: 20px;
}

@media (min-width: 600px) {
    header .logo {
        max-width: 320px;
        margin-top: 24px;
    }
}

main {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px 64px;
}

main h1 {
    font-size: 22px;
    text-align: center;
    color: #0C2340;
    margin: 24px 0 0;
}

/* Search */

.search-form {
    display: flex;
    justify-content: center;
    margin: 32px 0 40px;
}

.search-pill {
    position: relative;
    width: 100%;
    max-width: 650px;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    box-sizing: border-box;
    font-size: 18px;
    padding: 14px 52px 14px 24px;
    border: 1px solid #dfe1e5;
    border-radius: 999px;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.15);
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.search-input:focus {
    border-color: #FF6700;
    box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.2);
}

.search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: #5f6368;
    cursor: pointer;
}

.search-button:hover {
    background-color: #f1f3f4;
}

/* Results */

.results-summary {
    color: #70757a;
    font-size: 14px;
    margin: 0 0 12px 4px;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.12s ease;
}

a.result-card:hover,
a.result-card:focus-visible {
    background-color: #f4f4f5;
}

.result-card:hover .result-title {
    text-decoration: underline;
}

.result-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: #FF6700;
}

.result-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.result-title {
    font-size: 17px;
    font-weight: 600;
    color: #0C2340;
    word-break: break-word;
}

.placeholder-text {
    color: #9aa0a6;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    font-size: 12px;
    color: #5f6368;
    background-color: #f1f3f4;
    padding: 3px 10px;
    border-radius: 999px;
    text-transform: capitalize;
}

.badge-coming-soon {
    color: #9aa0a6;
    font-style: italic;
}

.no-results {
    color: #70757a;
    padding: 16px 4px;
}

/* Footer */

footer {
    text-align: center;
    padding: 8px 16px 40px;
}

footer a {
    color: #9aa0a6;
    font-size: 12px;
    text-decoration: none;
}

footer a:hover,
footer a:active {
    text-decoration: underline;
}

/* Admin login */

.login-main {
    display: flex;
    justify-content: center;
    padding: 64px 16px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
    box-sizing: border-box;
}

.login-card h1 {
    font-size: 20px;
    text-align: center;
    color: #0C2340;
    margin: 0 0 24px;
}

.login-card label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    margin: 16px 0 6px;
}

.login-card input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.login-card input:focus {
    border-color: #FF6700;
    box-shadow: 0 0 0 3px rgba(255, 103, 0, 0.2);
}

.login-card button {
    width: 100%;
    margin-top: 24px;
    padding: 12px;
    background-color: #0C2340;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.login-card button:hover {
    background-color: #16305c;
}

.login-error {
    background-color: #fdecea;
    color: #b3261e;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 8px;
    margin: 0 0 8px;
}

/* Terms page */

.terms-page {
    background-color: #0C2340;
}

.terms-page footer a {
    color: rgba(255, 255, 255, 0.7);
}

.terms-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px 64px;
}

.terms-prose {
    max-width: 680px;
    margin: 0 auto 40px;
}

.terms-main h1 {
    font-size: 26px;
    text-align: center;
    color: #fff;
    margin: 0 0 28px;
}

.terms-prose p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 20px;
}

.terms-prose h2 {
    font-size: 20px;
    color: #fff;
    margin: 40px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.terms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .terms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .terms-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.terms-grid section {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 20px;
}

.terms-grid h3 {
    font-size: 15px;
    color: #fff;
    margin: 0 0 10px;
}

.terms-grid p {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}
