/* ============================
   FediSverige — CSS
   Colors: green/cream palette from design screenshots
   Mobile-first responsive design
   ============================ */

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

:root {
    --color-primary: #4a6741;
    --color-primary-dark: #3a5331;
    --color-primary-light: #5c7d52;
    --color-bg: #f5f0e8;
    --color-bg-card: #ffffff;
    --color-bg-section: #eae5dc;
    --color-text: #2c2c2c;
    --color-text-light: #666666;
    --color-text-muted: #888888;
    --color-border: #d4cfc6;
    --color-border-light: #e8e3da;
    --color-success: #4a6741;
    --color-warning: #c9961a;
    --color-danger: #c44d4d;
    --color-info: #4a7fa5;
    --color-badge-bg: #eef2ec;
    --color-badge-text: #4a6741;
    --color-tag-bg: #e8e3da;
    --color-tag-text: #4a6741;
    --color-favorite: #4a6741;
    --color-favorite-active: #c44d4d;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 50px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --container-max: 900px;
    --container-wide: 1100px;
}

html {
    font-size: 17px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

.container-wide {
    max-width: var(--container-wide);
}

/* --- Header --- */
.site-header {
    background: var(--color-bg-card);
    border-bottom: 1px solid var(--color-border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    max-width: var(--container-wide);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
}
.logo:hover {
    text-decoration: none;
}

.logo-flag {
    font-size: 1.5rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 0.75rem;
    color: var(--color-text);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: background-color 0.15s;
}
.nav-link:hover {
    background-color: var(--color-bg);
    text-decoration: none;
}

.nav-btn {
    background-color: var(--color-primary);
    color: #fff !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
}
.nav-btn:hover {
    background-color: var(--color-primary-dark);
    color: #fff !important;
}
.nav-btn svg {
    stroke: #fff;
}

.nav-favorites {
    position: relative;
}

.favorites-count {
    background: var(--color-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.15rem;
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    position: relative;
    transition: background 0.2s;
}
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    position: absolute;
    left: 0;
    transition: transform 0.2s;
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

.mobile-menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}
.mobile-menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* --- Main --- */
.site-main {
    flex: 1;
    padding: 2rem 0;
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--color-border-light);
    padding: 1.25rem 0;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-wide);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-nav {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--color-text-light);
    text-decoration: none;
}
.footer-nav a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    font-family: var(--font-main);
    line-height: 1.4;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}
.btn-outline:hover {
    background: var(--color-bg);
    border-color: var(--color-text-light);
}

.btn-danger {
    background-color: var(--color-danger);
    color: #fff;
    border-color: var(--color-danger);
}
.btn-danger:hover {
    background-color: #a93d3d;
}

.btn-success {
    background-color: var(--color-success);
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-text-light);
    transition: all 0.15s;
    padding: 0;
}
.btn-icon:hover {
    background: var(--color-bg);
    color: var(--color-text);
}
.btn-icon svg {
    width: 20px;
    height: 20px;
}

.btn-favorite.is-active {
    color: var(--color-favorite-active);
}
.btn-favorite.is-active svg {
    fill: var(--color-favorite-active);
    stroke: var(--color-favorite-active);
}

/* --- Cards --- */
.card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-light);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-header {
    margin-bottom: 1rem;
}

/* --- Profile Cards --- */
.profile-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.15s;
}
.profile-card:hover {
    box-shadow: var(--shadow-sm);
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.profile-card-info {
    flex: 1;
    min-width: 0;
}

.profile-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.profile-card-handle {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-family: monospace;
    word-break: break-all;
}

.profile-card-actions {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.profile-card-categories {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.profile-cat-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.cat-icon {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-type {
    background: var(--color-badge-bg);
    color: var(--color-badge-text);
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-verified {
    background: #d1fae5;
    color: #065f46;
}

.badge-expired {
    background: #fee2e2;
    color: #991b1b;
}

/* --- Tags --- */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.8rem;
    background: var(--color-tag-bg);
    color: var(--color-tag-text);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--color-text-light);
    border-radius: 50%;
    padding: 0;
}
.tag-remove:hover {
    background: rgba(0,0,0,0.1);
    color: var(--color-text);
}

.tag-suggestion {
    border: 1.5px dashed var(--color-primary-light);
    background: #eef6ec;
}

.cat-suggest-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cat-suggest-row .form-input {
    flex: 1;
    min-width: 0;
}

.cat-suggest-row .btn {
    flex-shrink: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-label-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    font-size: 0.75rem;
    color: var(--color-text-light);
    cursor: help;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: var(--font-main);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    color: var(--color-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.15);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.8rem;
    color: var(--color-danger);
    margin-top: 0.25rem;
}

.form-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.form-radio-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.form-radio-label input[type="radio"] {
    accent-color: var(--color-primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* --- Search bar --- */
.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar .form-input {
    padding-left: 2.75rem;
    padding-right: 4rem;
    border-radius: var(--radius-full);
    font-size: 1rem;
}

.search-bar-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    pointer-events: none;
}

.search-bar .btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.5rem 1rem;
}

/* --- Hero section (home) --- */
.hero {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    line-height: 1.2;
}

.hero p {
    color: var(--color-text-light);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.5;
}

.hero-stats {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.75rem;
}
.hero-stats strong {
    color: var(--color-text);
}

.hero-links {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

/* --- Filter section --- */
.filter-section {
    background: var(--color-bg-section);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 2rem;
}

.filter-body {
    margin-top: 0.75rem;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-description {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.filter-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
    display: block;
}

.filter-select {
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

/* --- Active filters bar --- */
.active-filters {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 0.65rem 1rem;
    margin-bottom: 0.75rem;
}

.active-filters-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.active-filters-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-light);
    white-space: nowrap;
}

.active-filters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    flex: 1;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    background: var(--color-tag-bg);
    color: var(--color-tag-text);
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.active-filter-tag-type {
    font-weight: 600;
    opacity: 0.7;
    margin-right: 0.1rem;
}

.active-filter-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: var(--color-text-light);
    border-radius: 50%;
    padding: 0;
    margin-left: 0.1rem;
}
.active-filter-tag-remove:hover {
    background: rgba(0,0,0,0.1);
    color: var(--color-text);
}
.active-filter-tag-query {
    background: rgba(74, 127, 165, 0.12);
    color: var(--color-info);
}

/* --- Category modal trigger button --- */
.cat-modal-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
    font-family: var(--font-main);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    cursor: pointer;
    color: var(--color-text-muted);
    text-align: left;
    transition: border-color 0.15s;
}
.cat-modal-trigger:hover {
    border-color: var(--color-primary-light);
}
.cat-modal-trigger:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.15);
}
.cat-modal-trigger.has-selection {
    color: var(--color-text);
    border-color: var(--color-primary-light);
}
.cat-modal-trigger svg {
    flex-shrink: 0;
}

/* --- Category modal list --- */
.cat-modal-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

.cat-modal-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid var(--color-border-light);
    user-select: none;
}
.cat-modal-item:last-child {
    border-bottom: none;
}
.cat-modal-item:hover {
    background: var(--color-bg);
}
.cat-modal-item input[type="checkbox"],
.cat-modal-item input[type="radio"] {
    accent-color: var(--color-primary);
    width: 17px;
    height: 17px;
    cursor: pointer;
    flex-shrink: 0;
}
.cat-modal-item.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* --- Category dropdown (registration) --- */
.category-dropdown {
    position: relative;
    margin-bottom: 0.25rem;
}

.category-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.category-dropdown-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.category-dropdown-count {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.category-dropdown-description {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-bottom: 0.35rem;
}

.category-dropdown-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    font-family: var(--font-main);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-card);
    cursor: pointer;
    color: var(--color-text-muted);
    text-align: left;
    transition: border-color 0.15s;
}
.category-dropdown-trigger:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(74, 103, 65, 0.15);
}
.category-dropdown-trigger svg {
    flex-shrink: 0;
    transition: transform 0.2s;
}
.category-dropdown.is-open .category-dropdown-trigger svg {
    transform: rotate(180deg);
}

.category-dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 50;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 260px;
    overflow-y: auto;
    margin-top: 2px;
}

.category-dropdown.is-open .category-dropdown-menu {
    display: block;
}

.category-dropdown-search {
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    font-family: var(--font-main);
    border: none;
    border-bottom: 1px solid var(--color-border-light);
    outline: none;
}
.category-dropdown-search:focus {
    box-shadow: none;
}

.category-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.1s;
}
.category-dropdown-item:hover {
    background: var(--color-bg);
}
.category-dropdown-item.is-selected {
    color: var(--color-primary);
    font-weight: 500;
}
.category-dropdown-item input[type="checkbox"],
.category-dropdown-item input[type="radio"] {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
}

.category-dropdown-empty {
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-align: center;
}

.category-dropdown-suggest {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--color-border-light);
}

.category-dropdown-suggest-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    background: var(--color-bg);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-primary);
    font-family: var(--font-main);
}
.category-dropdown-suggest-btn:hover {
    background: var(--color-badge-bg);
}

/* --- Steps indicator --- */
.steps-indicator {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.step-dot {
    width: 60px;
    height: 6px;
    border-radius: 3px;
    background: var(--color-border);
    transition: background 0.2s;
}
.step-dot.active {
    background: var(--color-primary);
}
.step-dot.completed {
    background: var(--color-primary-light);
}

/* --- Verification section --- */
.verification-code-display {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
}

.verification-code {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: monospace;
    letter-spacing: 0.1em;
}

.verification-message {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.verification-message-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.4rem;
}

.copy-btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    margin-top: 1.25rem;
    background: var(--color-bg-card);
    border: 2px solid var(--color-primary);
    border-radius: var(--radius-md);
    padding: 0.7rem 1rem;
    min-height: 44px;
    cursor: pointer;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s;
}
.copy-btn-block:hover {
    background: var(--color-primary);
    color: #fff;
}
.copy-btn-block.copy-btn-success {
    color: var(--color-success);
    border-color: var(--color-success);
}

.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-text);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: calc(100vw - 2rem);
    width: max-content;
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
    z-index: 9999;
    pointer-events: none;
    box-shadow: var(--shadow-lg);
}
.toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.toast-success {
    background: var(--color-success);
}
.toast-warning {
    background: var(--color-warning);
    color: var(--color-text);
}
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
}
.toast-close:hover {
    opacity: 1;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
.spin {
    animation: spin 0.8s linear infinite;
}

.verification-instructions {
    margin-top: 1.25rem;
}

.verification-instructions ol {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}

.verification-instructions li {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.info-box {
    border: 1px solid var(--color-primary);
    background: rgba(74, 103, 65, 0.05);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 1rem;
}

.info-box-title {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.info-box ul {
    padding-left: 1.25rem;
    font-size: 0.85rem;
}
.info-box li {
    margin-bottom: 0.25rem;
}

.tip-box {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: rgba(74, 127, 165, 0.08);
    border: 1px solid rgba(74, 127, 165, 0.25);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    margin-top: 1.25rem;
    font-size: 0.88rem;
    color: var(--color-text);
    line-height: 1.45;
}
.tip-box > svg {
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--color-info);
}
.tip-box p {
    margin: 0;
}
.tip-copy-btn {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--color-info);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}
.tip-copy-btn:hover {
    color: var(--color-primary-dark);
}
.tip-copy-btn svg {
    vertical-align: -1px;
}

/* --- Section headers --- */
.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.section-header svg {
    color: var(--color-text-light);
}

/* --- Favorites page --- */
.favorites-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.favorites-sidebar {
    position: sticky;
    top: 80px;
}

.favorites-sidebar .card {
    padding: 1.25rem;
}

.favorites-sidebar h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.favorites-sidebar p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.favorites-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.favorites-tip {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

.clear-favorites {
    margin-top: 1rem;
    text-align: center;
}

.clear-favorites a {
    font-size: 0.8rem;
    color: var(--color-danger);
    cursor: pointer;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border-light);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 0;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 0 1.5rem 1.5rem;
}

.follow-handle-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.follow-instructions {
    margin-top: 1rem;
    font-size: 0.9rem;
}
.follow-instructions ol {
    padding-left: 1.25rem;
    margin-top: 0.5rem;
}
.follow-instructions li {
    margin-bottom: 0.3rem;
}

/* --- Admin --- */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
}

.stat-card-icon {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.25rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border-light);
}

.admin-tab {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    border-bottom: 2px solid transparent;
    font-family: var(--font-main);
    transition: all 0.15s;
}
.admin-tab:hover {
    color: var(--color-text);
}
.admin-tab.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    font-weight: 500;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table th {
    text-align: left;
    padding: 0.65rem 0.75rem;
    font-weight: 600;
    color: var(--color-text-light);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.8rem;
}

.admin-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.admin-actions {
    display: flex;
    gap: 0.35rem;
}

/* Quick actions */
.quick-actions {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.quick-actions h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.quick-action-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quick-action-row p {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* --- Static pages --- */
.page-content {
    max-width: 750px;
    margin: 0 auto;
}

.page-content h1 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.page-content h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.page-content h3 {
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.page-content p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

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

.page-content li {
    margin-bottom: 0.35rem;
    line-height: 1.6;
}

.page-content a {
    text-decoration: underline;
}

.sustainability-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.sustainability-section h2 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-section {
    margin-bottom: 1.5rem;
}

.help-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.content-section {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.content-section h2 {
    margin-top: 0;
}

.page-cta {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

/* --- Alert --- */
.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-bg-card);
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.15s;
}

.pagination-btn:hover {
    background: var(--color-bg);
    border-color: var(--color-primary-light);
    text-decoration: none;
}

.pagination-btn.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.pagination-btn.disabled {
    color: var(--color-text-muted);
    background: var(--color-bg);
    border-color: var(--color-border-light);
    pointer-events: none;
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-group {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-bg-card);
        border-bottom: 1px solid var(--color-border-light);
        box-shadow: var(--shadow-md);
        flex-direction: column;
        padding: 0.5rem;
        gap: 0;
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
        border-radius: var(--radius-sm);
    }

    .nav-btn {
        margin: 0.25rem 0.5rem;
        justify-content: center;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .favorites-layout {
        grid-template-columns: 1fr;
    }

    .favorites-sidebar {
        position: static;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }

    .admin-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        width: 100%;
    }

    .profile-card-header {
        flex-direction: column-reverse;
    }

    .profile-card-actions {
        justify-content: space-between;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .footer-nav {
        justify-content: center;
    }

    .quick-action-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .steps-indicator {
        gap: 0.35rem;
    }

    .step-dot {
        width: 40px;
    }

    .page-content h1 {
        font-size: 1.4rem;
    }

    .card {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }

    .hero {
        padding: 1.5rem 0.5rem 1rem;
    }

    .hero h1 {
        font-size: 1.3rem;
    }

    .search-bar .form-input {
        font-size: 0.9rem;
    }

    .profile-card {
        padding: 1rem;
    }

    .profile-card-name {
        font-size: 1rem;
    }

    .form-radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .verification-code {
        font-size: 1.25rem;
    }
}

/* --- Staging Banner --- */
.staging-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #d9534f;
    color: #fff;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.3rem 1rem;
    letter-spacing: 0.05em;
}

body:has(.staging-banner) .site-header {
    margin-top: 1.6rem;
}

/* --- Site Announcement Banner --- */
.site-banner {
    background: #fef3cd;
    border-bottom: 1px solid #e8d990;
    padding: 0.6rem 1rem;
    text-align: center;
}

.site-banner-content {
    max-width: var(--container-max);
    margin: 0 auto;
    font-size: 0.9rem;
    color: #664d03;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .site-banner {
        padding: 0.5rem 0.75rem;
    }
    .site-banner-content {
        font-size: 0.85rem;
    }
}

/* Print */
@media print {
    .site-header, .site-footer, .btn, .modal-overlay, .staging-banner, .site-banner {
        display: none !important;
    }
    body {
        background: #fff;
    }
    .profile-card {
        break-inside: avoid;
        border: 1px solid #ccc;
    }
}
