/* Theme overrides for Bulma */
:root {
    --bulma-scheme-main: #f8f5f0;
    --bulma-scheme-main-bis: #f3efe8;
    --bulma-text: #2c2416;
    --bulma-text-weak: #8a7e6b;
    --bulma-text-strong: #2c2416;
    --bulma-link: #4a7c59;
    --bulma-link-text: #4a7c59;
    --bulma-link-hover: #3d6649;
    --bulma-border: #e8e2d8;
    --bulma-border-weak: #e8e2d8;
    --bulma-card-background-color: #fff;
    --bulma-card-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.04);
    --bulma-input-border-color: #ddd6cb;
    --bulma-input-focus-border-color: #4a7c59;
    --bulma-input-focus-shadow-color: rgba(74, 124, 89, 0.1);
    --bulma-input-background-color: #faf9f7;
    --bulma-danger: #a8432a;
    --bulma-danger-light: #fef2f0;
    --bulma-family-primary: "DM Sans", sans-serif;
    --bulma-radius: 10px;
    --bulma-radius-medium: 12px;
    --bulma-radius-large: 20px;
    --bulma-card-radius: 20px;
    --bulma-pre-background: #faf9f7;
    --bulma-code-background: #faf9f7;
    --bulma-code-color: #2c2416;
    --accent: #4a7c59;
    --accent-hover: #3d6649;
    --border: #e8e2d8;
}

html,
body {
    min-height: 100vh;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.page-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 480px;
    width: 100%;
}

/* entry animation */
.card {
    animation: fadeUp 0.5s ease-out;
    border: 1px solid var(--border);
    background: #fff !important;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* icon */
.icon-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: 18px;
    background: linear-gradient(135deg, #f0f7f1 0%, #e8f0e4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.12);
    animation: float 3s ease-in-out infinite;
}

.login-card .icon-wrap {
    width: 56px;
    height: 56px;
    font-size: 28px;
    border-radius: 14px;
    box-shadow: none;
    animation: none;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* title */
.page-title {
    font-family: "DM Serif Display", serif !important;
    font-weight: 400 !important;
    letter-spacing: -0.01em;
    color: #2c2416 !important;
}

/* github link */
.github-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #8a7e6b;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-top: 0.5rem;
}

.github-link:hover {
    color: #2c2416;
}

/* --- tabs --- */

.tabs-wrap .tab-input {
    display: none;
}

.tabs-wrap .tabs {
    margin-bottom: 0;
}

.tabs-wrap .tabs li {
    flex: 1;
}

.tabs-wrap .tabs a,
.tabs-wrap .tabs label {
    color: #8a7e6b;
    border-bottom-color: var(--border);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5em 1em;
    display: flex;
    justify-content: center;
    transition: all 0.2s ease;
}

.tabs-wrap .tabs a:hover,
.tabs-wrap .tabs label:hover {
    color: #2c2416;
    border-bottom-color: #ccc5b8;
    background: transparent;
}

.tabs-wrap .tab-panel {
    display: none;
    padding-top: 1.25rem;
}

#tab-claude:checked ~ .tab-panel.panel-claude,
#tab-other:checked ~ .tab-panel.panel-other {
    display: block;
}

#tab-claude:checked ~ .tabs .tab-claude-label,
#tab-other:checked ~ .tabs .tab-other-label {
    color: var(--accent) !important;
    border-bottom-color: var(--accent) !important;
}

/* steps */
.steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 0;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 2rem;
    padding-bottom: 0.85rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #2c2416;
}

.steps li:last-child {
    padding-bottom: 0;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.05rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0f7f1 0%, #e8f0e4 100%);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* code */
code,
pre {
    font-family: "DM Mono", monospace !important;
    background: #faf9f7 !important;
    color: #2c2416 !important;
}

code {
    border: 1px solid var(--border);
    font-size: 0.8em;
    padding: 0.1em 0.4em;
    border-radius: 4px;
}

pre.code-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    line-height: 1.6;
}

/* how it works */
.how-it-works {
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

/* legal page */
.legal-section {
    margin-bottom: 1.25rem;
}

.legal-section:last-of-type {
    margin-bottom: 0;
}

.legal-heading {
    font-family: "DM Serif Display", serif;
    font-size: 1rem;
    font-weight: 400;
    color: #2c2416;
    margin-bottom: 0.35rem;
}

.legal-section p {
    font-size: 0.875rem;
    line-height: 1.6;
    color: #5a5247;
}

.legal-section a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-section a:hover {
    color: var(--accent-hover);
}

.back-link {
    font-size: 0.85rem;
    color: #8a7e6b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #2c2416;
}

.icon-wrap-small {
    width: 56px;
    height: 56px;
    font-size: 28px;
    border-radius: 14px;
    box-shadow: none;
    animation: none;
}

/* footer links */
.footer-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.footer-links .separator {
    color: var(--border);
}

/* hint text */
.panel-hint {
    color: #8a7e6b;
}

/* error banner */
.error-banner {
    background: #fef2f0;
    border: 1px solid #f0d0ca;
    color: #a8432a;
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* login form overrides */
.login-card .label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
    color: #8a7e6b;
}

.login-card .button {
    font-weight: 500;
    transition: all 0.2s ease;
}

.login-card .button:hover {
    transform: translateY(-1px);
}

.login-card .button.is-link {
    box-shadow: 0 2px 8px rgba(74, 124, 89, 0.2);
}

.login-card .button.is-link:hover {
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.28);
}
