/*
Theme Name: TaskHike
Theme URI: https://taskhike.com/
Author: TaskHike
Description: Lightweight custom WordPress theme foundation for TaskHike.
Version: 0.1.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: taskhike
*/

:root {
    --th-color-primary: #2563eb;
    --th-color-primary-dark: #1d4ed8;
    --th-color-text: #111827;
    --th-color-muted: #6b7280;
    --th-color-border: #e5e7eb;
    --th-color-surface: #ffffff;
    --th-color-background: #f8fafc;
    --th-color-success: #16a34a;
    --th-radius-sm: 8px;
    --th-radius-md: 12px;
    --th-radius-lg: 18px;
    --th-container: 1180px;
    --th-gap: 24px;
    --th-shadow-sm: 0 1px 3px rgba(15, 23, 42, .08);
    --th-shadow-md: 0 10px 30px rgba(15, 23, 42, .08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--th-color-background);
    color: var(--th-color-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
}

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

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

a:hover {
    color: var(--th-color-primary-dark);
}

button,
input,
textarea,
select {
    font: inherit;
}

button,
input[type="submit"] {
    cursor: pointer;
}

.container {
    width: min(calc(100% - 32px), var(--th-container));
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 20;
    background: var(--th-color-surface);
    border-bottom: 1px solid var(--th-color-border);
}

.site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-branding {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--th-color-text);
    font-weight: 800;
    font-size: 1.15rem;
}

.site-branding:hover {
    color: var(--th-color-text);
}

.site-branding img {
    max-height: 42px;
    width: auto;
}

.site-navigation {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-navigation ul {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-navigation a {
    color: var(--th-color-text);
    font-size: .95rem;
    font-weight: 600;
}

.site-navigation a:hover {
    color: var(--th-color-primary);
}

.menu-toggle {
    display: none;
    border: 1px solid var(--th-color-border);
    background: var(--th-color-surface);
    color: var(--th-color-text);
    border-radius: var(--th-radius-sm);
    padding: 8px 12px;
}

.site-main {
    min-height: 60vh;
}

.site-footer {
    margin-top: 64px;
    padding: 40px 0;
    background: #111827;
    color: #d1d5db;
}

.site-footer a {
    color: #e5e7eb;
}

.site-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.hero {
    padding: 88px 0;
    background: var(--th-color-surface);
}

.hero__content {
    max-width: 760px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--th-color-primary);
    font-size: .85rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 20px;
    font-size: clamp(2.2rem, 5vw, 4.25rem);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: var(--th-color-muted);
    font-size: 1.1rem;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--th-radius-sm);
    background: var(--th-color-primary);
    color: #fff;
    font-weight: 700;
}

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

.button--secondary {
    border-color: var(--th-color-border);
    background: var(--th-color-surface);
    color: var(--th-color-text);
}

.button--secondary:hover {
    background: #f3f4f6;
    color: var(--th-color-text);
}

.section {
    padding: 64px 0;
}

.section__header {
    margin-bottom: 28px;
}

.section__header h2 {
    margin: 0 0 8px;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.15;
}

.section__header p {
    margin: 0;
    color: var(--th-color-muted);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--th-gap);
}

.card {
    padding: 24px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-md);
    background: var(--th-color-surface);
    box-shadow: var(--th-shadow-sm);
}

.card h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.card p {
    margin: 0;
    color: var(--th-color-muted);
}

.content-area {
    padding: 64px 0;
}

.content-wrap {
    max-width: 820px;
    margin-inline: auto;
}

.entry-header {
    margin-bottom: 28px;
}

.entry-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.1;
    letter-spacing: -.03em;
}

.entry-meta {
    margin-top: 12px;
    color: var(--th-color-muted);
    font-size: .9rem;
}

.entry-content > * + * {
    margin-top: 1.2em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    line-height: 1.25;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
}

.entry-content th,
.entry-content td {
    padding: 10px;
    border: 1px solid var(--th-color-border);
    text-align: left;
}

.entry-content pre {
    overflow: auto;
    padding: 16px;
    border-radius: var(--th-radius-sm);
    background: #111827;
    color: #e5e7eb;
}

.entry-content blockquote {
    margin-inline: 0;
    padding: 8px 20px;
    border-left: 4px solid var(--th-color-primary);
    color: var(--th-color-muted);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    min-width: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-sm);
    background: var(--th-color-surface);
}

.related-content {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--th-color-border);
}

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

.related-content__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.related-content__item {
    padding: 16px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-sm);
    background: var(--th-color-surface);
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 999;
    padding: 10px 14px;
    background: #111827;
    color: #fff;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

@media (max-width: 800px) {
    .site-header__inner {
        min-height: 64px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .site-navigation {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        padding: 16px;
        border-bottom: 1px solid var(--th-color-border);
        background: var(--th-color-surface);
    }

    .site-navigation.is-open {
        display: block;
    }

    .site-navigation ul {
        flex-direction: column;
        align-items: stretch;
    }

    .site-navigation a {
        display: block;
        padding: 8px 0;
    }

    .hero {
        padding: 64px 0;
    }

    .card-grid,
    .related-content__grid {
        grid-template-columns: 1fr;
    }

    .site-footer__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

.taskhike-cpt-summary{margin-top:32px}.taskhike-cpt-summary p{margin:6px 0}


/* Task directory */
.task-directory {
    padding: 64px 0;
}

.task-directory__header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
}

.task-directory__header p {
    margin: 12px 0 0;
    color: var(--th-color-muted);
}

.task-filters {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(140px, 1fr)) auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-md);
    background: var(--th-color-surface);
}

.task-filters label {
    display: block;
    margin-bottom: 6px;
    font-size: .82rem;
    font-weight: 700;
}

.task-filters input,
.task-filters select {
    width: 100%;
    min-height: 44px;
    padding: 8px 11px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-sm);
    background: #fff;
    color: var(--th-color-text);
}

.task-filters__actions {
    display: flex;
    gap: 8px;
}

.task-filters__actions .button {
    white-space: nowrap;
}

.task-directory__summary {
    margin: 18px 0;
    color: var(--th-color-muted);
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.task-card {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-md);
    background: var(--th-color-surface);
    box-shadow: var(--th-shadow-sm);
}

.task-card__top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.task-card__type,
.task-card__featured,
.task-detail__badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .75rem;
    font-weight: 800;
}

.task-card__featured {
    background: #fef3c7;
    color: #92400e;
}

.task-card__title {
    margin: 0 0 10px;
    font-size: 1.2rem;
    line-height: 1.3;
}

.task-card__title a {
    color: var(--th-color-text);
}

.task-card__title a:hover {
    color: var(--th-color-primary);
}

.task-card__excerpt {
    color: var(--th-color-muted);
    font-size: .92rem;
}

.task-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: auto;
    padding-top: 20px;
    color: var(--th-color-muted);
    font-size: .85rem;
}

.task-card__link {
    width: 100%;
    margin-top: 16px;
}

.task-empty {
    padding: 48px;
    border: 1px dashed var(--th-color-border);
    border-radius: var(--th-radius-md);
    background: var(--th-color-surface);
    text-align: center;
}

.task-detail {
    padding: 64px 0;
}

.task-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
}

.task-detail__header {
    margin-bottom: 32px;
}

.task-detail__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.task-detail__intro {
    margin-top: 16px;
    color: var(--th-color-muted);
    font-size: 1.05rem;
}

.task-detail__section {
    margin-top: 40px;
}

.task-detail__section h2 {
    margin-bottom: 14px;
}

.task-detail__section ul {
    margin: 0;
    padding-left: 22px;
}

.task-detail__notice {
    padding: 20px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-md);
    background: #fff;
}

.task-term-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-term-list span {
    padding: 6px 10px;
    border: 1px solid var(--th-color-border);
    border-radius: 999px;
    background: var(--th-color-surface);
    font-size: .85rem;
}

.task-summary--sticky {
    position: sticky;
    top: 24px;
}

.task-summary__reward {
    display: grid;
    gap: 2px;
    margin: 18px 0 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--th-color-border);
}

.task-summary__reward span {
    color: var(--th-color-muted);
    font-size: .85rem;
}

.task-summary__reward strong {
    font-size: 2rem;
    line-height: 1.1;
}

.task-summary__row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--th-color-border);
    font-size: .9rem;
}

.task-summary__row span {
    color: var(--th-color-muted);
}

.task-summary__button {
    width: 100%;
    margin-top: 20px;
}

.task-summary__note {
    margin: 10px 0 0;
    color: var(--th-color-muted);
    font-size: .78rem;
}

.button--disabled {
    background: #9ca3af;
    color: #fff;
    cursor: not-allowed;
}

.button--disabled:hover {
    background: #9ca3af;
    color: #fff;
}

@media (max-width: 1050px) {
    .task-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-filters__search {
        grid-column: 1 / -1;
    }

    .task-filters__actions {
        grid-column: 1 / -1;
    }

    .task-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-detail__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .task-summary--sticky {
        position: static;
    }
}

@media (max-width: 650px) {
    .task-directory,
    .task-detail {
        padding: 40px 0;
    }

    .task-filters,
    .task-grid {
        grid-template-columns: 1fr;
    }

    .task-filters__search,
    .task-filters__actions {
        grid-column: auto;
    }

    .task-filters__actions {
        flex-direction: column;
    }

    .task-filters__actions .button {
        width: 100%;
    }
}

.th-form {
    max-width: 560px;
}

.th-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.th-form input {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-sm);
    background: var(--th-color-surface);
}

.th-form small {
    display: block;
    margin-top: 5px;
    color: var(--th-color-muted);
}

.th-notice {
    margin: 0 0 24px;
    padding: 14px 16px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-sm);
    background: var(--th-color-surface);
}

.th-notice--success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.th-notice--error {
    border-color: #fecaca;
    background: #fef2f2;
}

.th-notice ul {
    margin: 0;
    padding-left: 20px;
}

.th-claim-form {
    margin: 28px 0;
}

.login-remember label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-remember input {
    width: auto;
    min-height: auto;
}


.th-submission-form {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--th-color-border);
}

.th-form textarea,
.th-form input[type="url"],
.th-form input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-sm);
    background: var(--th-color-surface);
}

.th-form textarea {
    min-height: 130px;
    resize: vertical;
}

.th-form__help {
    color: var(--th-color-muted);
}

.th-task-status {
    display: grid;
    gap: 4px;
    margin: 20px 0;
    padding: 14px 16px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-sm);
    background: var(--th-color-surface);
}

.th-task-status--pending {
    border-color: #fde68a;
    background: #fffbeb;
}

.th-task-status--approved {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.th-admin-proof {
    max-width: 360px;
    margin-top: 6px;
    word-break: break-word;
}


/* Task editor date controls. */
.taskhike-clear-datetime {
    margin-left: 8px !important;
    vertical-align: middle;
}


/* Account navigation */
.taskhike-account-nav {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: 18px;
    padding-left: 18px;
    border-left: 1px solid var(--th-color-border);
}

.taskhike-account-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--th-color-text);
    font-size: .9rem;
    font-weight: 600;
}

.taskhike-account-nav a:hover {
    color: var(--th-color-primary);
}

.taskhike-notification-badge {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: .7rem;
    line-height: 1;
}

.account-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.account-page__intro {
    margin: 10px 0 0;
    color: var(--th-color-muted);
}

.account-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--th-gap);
    margin-bottom: 32px;
}

.account-stat {
    display: grid;
    gap: 5px;
    padding: 20px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-md);
    background: var(--th-color-surface);
    box-shadow: var(--th-shadow-sm);
}

.account-stat strong {
    font-size: 1.8rem;
    line-height: 1;
}

.account-stat span {
    color: var(--th-color-muted);
    font-size: .9rem;
}

.account-stat:hover {
    border-color: var(--th-color-primary);
}

.account-card-grid {
    margin-top: 32px;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.account-list {
    display: grid;
    gap: 12px;
}

.account-list__item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 20px;
    border: 1px solid var(--th-color-border);
    border-radius: var(--th-radius-md);
    background: var(--th-color-surface);
}

.account-list__item h2 {
    margin: 10px 0 6px;
    font-size: 1.1rem;
}

.account-list__item p {
    margin: 0;
    color: var(--th-color-muted);
}

.account-list__item time {
    flex: 0 0 auto;
    color: var(--th-color-muted);
    font-size: .85rem;
}

.account-list__note {
    margin-top: 12px;
    padding: 12px;
    border-radius: var(--th-radius-sm);
    background: var(--th-color-background);
    color: var(--th-color-text);
}

.account-status {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
}

.account-status--pending { background: #fffbeb; color: #92400e; }
.account-status--approved { background: #f0fdf4; color: #166534; }
.account-status--rejected { background: #fef2f2; color: #991b1b; }

.th-notice--info {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.th-task-status--rejected {
    border-color: #fecaca;
    background: #fef2f2;
}

.th-task-status__action {
    margin-top: 12px;
    color: var(--th-color-muted);
    font-size: .9rem;
}

@media (max-width: 900px) {
    .taskhike-account-nav {
        margin: 12px 0 0;
        padding: 12px 0 0;
        border-top: 1px solid var(--th-color-border);
        border-left: 0;
        flex-wrap: wrap;
    }

    .account-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .account-list__item {
        flex-direction: column;
    }

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