/* === BASE & SHARED STYLES === */
body {
    color: #d8dde2;
    background-color: #222831;
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans",
        Helvetica,
        Arial,
        sans-serif,
        "Apple Color Emoji",
        "Segoe UI Emoji";
}

.logo {
    text-align: center;
}

.logo img {
    width: 350px;
    max-height: 100px;
    margin: 0 auto;
}

.rfd {
    padding: 20px;
    display: block;
    margin: 0 auto;
    max-width: 1080px;
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
}

.rfd a {
    color: #2997ff;
    text-decoration-line: none;
}

.rfd a:hover {
    text-decoration: underline;
}

pre code {
    color: #f8f8f2;
    background-color: #282a36;
    display: block;
    text-align: left;
    line-height: 1.45;
    margin: 0;
    padding: 16px;
    border-radius: 3px;
    overflow: auto;
}

code {
    color: #f8f8f2;
    background-color: #282a36;
    text-align: left;
    line-height: 1.45;
    margin: 0;
    padding: 2px;
    border-radius: 3px;
    overflow: auto;
}

/* === SHARED COMPONENTS (Badges, Tags, Lists) === */
.state-badge {
    font-size: 0.75rem;
    text-align: center;
    display: inline-block;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
}

.authors-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}
.author-item {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #a0aec0;
}
.author-icon {
    width: 1rem;
    height: 1rem;
    margin-right: 0.375rem;
    color: #718096;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
.tag-item {
    display: inline-block;
    background-color: #4a5568;
    color: #e2e8f0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    transition: background-color 0.2s;
}
.tag-item:hover {
    background-color: #718096;
    color: white;
    text-decoration: none;
}

/* State-specific colors */
.state-committed,
.state-Committed,
.state-commited {
    background-color: #1f7f4a;
    color: #ffffff;
}
.state-discussion {
    background-color: #2977b2;
    color: #ffffff;
}
.state-ideation {
    background-color: #8957e5;
    color: #ffffff;
}
.state-published {
    background-color: #5c6ac4;
    color: #ffffff;
}
.state-prediscussion {
    background-color: #d97706;
    color: #ffffff;
}
.state-abandoned {
    background-color: #b91c1c;
    color: #ffffff;
}
.state-draft {
    background-color: #4b5563;
    color: #ffffff;
}

/* === INDEX/LIST PAGE STYLES === */
.rfd-header {
    text-align: center;
    margin-bottom: 3rem;
}

.rfd-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #4a5568;
    padding-bottom: 1rem;
    margin-top: 1.5rem;
}

.rfd-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f7fafc;
    text-align: left;
}

.create-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    background-color: #4299e1;
    border-radius: 0.375rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.create-button:hover {
    background-color: #3182ce;
    text-decoration: none;
}

.create-button-text {
    margin-left: 0.5rem;
}

@media (max-width: 640px) {
    .create-button-text {
        display: none;
    }
}

.tag-filter-title {
    margin-top: 1rem;
    text-align: left;
    font-size: 1.25rem;
}

.rfd-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rfd-card {
    background-color: #393e46;
    border-radius: 0.5rem;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.rfd-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 10px 15px -3px rgba(0, 0, 0, 0.2),
        0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.rfd-card-main {
    flex-grow: 1;
    min-width: 0;
}

.rfd-card-header {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.rfd-id {
    font-size: 0.875rem;
    font-weight: 600;
    color: #a0aec0;
}

.rfd-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f7fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.rfd-card-title a:hover {
    color: #63b3ed;
    text-decoration: none;
}

.rfd-card-meta {
    padding-left: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rfd-card-status {
    flex-shrink: 0;
    margin-left: 1rem;
}

.rfd-card-status .state-badge {
    width: 8rem; /* Fixed width for alignment */
}

.sample-section {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #4a5568;
}

.sample-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

/* === RFD DETAIL PAGE STYLES === */
.rfd-detail-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.detail-header-content {
    background-color: #393e46;
    border-radius: 0.5rem;
    padding: 2rem;
    margin-top: 1.5rem;
    text-align: left;
}

.detail-title-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.detail-id {
    font-size: 1.5rem;
    font-weight: 600;
    color: #a0aec0;
    padding-top: 0.25rem;
}

.detail-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #f7fafc;
    line-height: 1.2;
    margin: 0;
}

.detail-meta-info {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 4rem;
}

.detail-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.discussion-link a {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    color: #a0aec0;
    font-weight: 500;
}
.discussion-link svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.375rem;
    color: #718096;
}
.discussion-link a:hover {
    color: #63b3ed;
    text-decoration: none;
}
.discussion-link a:hover svg {
    color: #63b3ed;
}

.rfd-content {
    background-color: #393e46;
    border-radius: 0.5rem;
    padding: 2rem;
}

.rfd-content h1,
.rfd-content h2,
.rfd-content h3,
.rfd-content h4 {
    color: #c7d5f6;
    border-bottom: 1px solid #4a5568;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.rfd-content h1 {
    font-size: 1.875rem;
}
.rfd-content h2 {
    font-size: 1.5rem;
}
.rfd-content h3 {
    font-size: 1.25rem;
}

.rfd-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.rfd-content ul,
.rfd-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.rfd-content li {
    margin-bottom: 0.5rem;
}
.rfd-content li > ul,
.rfd-content li > ol {
    margin-top: 0.5rem;
}

.rfd-content .anchor {
    visibility: hidden;
    margin-left: 0.5rem;
}
.rfd-content h1:hover .anchor,
.rfd-content h2:hover .anchor,
.rfd-content h3:hover .anchor {
    visibility: visible;
}

/* === CREATE PAGE STYLES === */
.create-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.create-form-container {
    background-color: #393e46;
    border-radius: 0.5rem;
    padding: 2.5rem;
    max-width: 768px;
    margin: 1.5rem auto 0;
}

.create-form-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #f7fafc;
    margin: 0 0 2rem 0;
    text-align: left;
}

.create-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.form-input {
    background-color: #2d3748;
    color: #f7fafc;
    border: 1px solid #4a5568;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

.submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background-color: #4299e1;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
    width: 100%;
}

.submit-button:hover {
    background-color: #3182ce;
}

/* === LOGIN PAGE STYLES === */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    gap: 2rem;
}

.login-form-container {
    background-color: #393e46;
    border-radius: 0.5rem;
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.login-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: #f7fafc;
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.login-subtitle {
    font-size: 1rem;
    color: #a0aec0;
    margin: 0 0 2rem 0;
    text-align: center;
}

