@import url('home.css');

:root {
    --site-navy: #0c2d4a;
    --site-blue: #1a4d73;
    --site-teal: #2a7a8c;
    --site-bg: #f4f7fa;
    --site-surface: #ffffff;
    --site-text: #1f2d3d;
    --site-muted: #5c6b7a;
    --site-border: #d8e2ea;
    --site-accent: #1a6b8a;
    --site-accent-soft: #e8f3f7;
    --site-success: #1e7a55;
    --site-radius: 12px;
    --site-shadow: 0 8px 32px rgba(12, 45, 74, 0.08);
    --site-max: 1120px;
    --tools-banner: linear-gradient(135deg, #0c2d4a 0%, #1a4d73 45%, #2a7a8c 100%);
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.tools-page {
    padding: 0 0 72px;
    min-height: 60vh;
}

.tools-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.tools-page-banner {
    background: var(--tools-banner);
    color: #fff;
    padding: 36px 20px 40px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
}

.tools-page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

.tools-page-banner-inner {
    max-width: 960px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tools-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    margin-bottom: 16px;
}

.tools-breadcrumb a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.15s;
}

.tools-breadcrumb a:hover {
    color: #fff;
    text-decoration: none;
}

.tools-breadcrumb-sep {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
}

.tools-breadcrumb-current {
    color: #fff;
    font-weight: 600;
}

.tools-page-banner h1,
.tools-hero h1 {
    font-size: clamp(1.4rem, 3.2vw, 1.85rem);
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.45;
}

.tools-page-banner h1 {
    color: #fff;
}

.tools-page-banner p,
.tools-hero p {
    font-size: 0.92rem;
    line-height: 1.85;
    max-width: 640px;
}

.tools-page-banner p {
    color: rgba(255, 255, 255, 0.88);
}

.tools-hero {
    margin-bottom: 32px;
    padding-top: 32px;
}

.tools-hero p {
    color: var(--site-muted, #5c6b7a);
}

.tools-page-banner .tools-breadcrumb a,
.tools-page-banner .tools-breadcrumb-current,
.tools-page-banner .tools-breadcrumb-sep {
    /* already styled above */
}

/* ── Tool cards grid ────────────────────────────────────────────────────── */
.tools-wrap--catalog {
    max-width: 1080px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 48px;
    align-items: stretch;
}

.tool-card {
    background: var(--site-surface, #fff);
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: 14px;
    box-shadow: var(--site-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.tool-card:hover {
    box-shadow: 0 12px 36px rgba(12, 45, 74, 0.1);
    border-color: #b8d4e4;
}

.tool-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--site-border, #d8e2ea);
    background: linear-gradient(180deg, #fafcfe 0%, #fff 100%);
}

.tool-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: var(--site-accent-soft, #e8f3f7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid rgba(26, 107, 138, 0.1);
}

.tool-card-head-text {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.tool-card-head h2 {
    font-size: 0.98rem;
    color: var(--site-navy, #0c2d4a);
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
}

.tool-status {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.tool-status-active { background: #dcfce7; color: #166534; }
.tool-status-partial { background: #e0f2fe; color: #0369a1; }
.tool-status-soon { background: #fef3c7; color: #92400e; }

.tool-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 20px 12px;
    min-height: 0;
}

.tool-card-summary {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--site-navy, #0c2d4a);
    line-height: 1.6;
    margin-bottom: 8px;
}

.tool-card-desc {
    font-size: 0.8rem;
    color: var(--site-muted, #5c6b7a);
    line-height: 1.75;
    margin-bottom: 12px;
}

.tool-card-howto {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px dashed var(--site-border, #d8e2ea);
}

.tool-card-howto-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--site-teal, #2a7a8c);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.tool-card-howto ol {
    margin: 0;
    padding-right: 18px;
    font-size: 0.76rem;
    line-height: 1.65;
    color: var(--site-muted, #5c6b7a);
}

.tool-card-howto li {
    margin-bottom: 5px;
}

.tool-card-howto li:last-child {
    margin-bottom: 0;
}

.tool-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 20px 16px;
    border-top: 1px solid var(--site-border, #d8e2ea);
}

.tool-card-badge {
    font-size: 0.72rem;
    color: var(--site-muted, #5c6b7a);
    line-height: 1.5;
    flex: 1;
    min-width: 0;
}

.tool-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 7px;
    background: var(--site-navy, #0c2d4a);
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}

.tool-card-btn:hover {
    background: var(--site-blue, #1a4d73);
    color: #fff;
    text-decoration: none;
}

.tool-card-btn::before {
    content: '←';
    margin-left: 5px;
    font-size: 0.85em;
}

/* Tool detail intro (subpages) */
.tool-intro-panel {
    background: var(--site-surface, #fff);
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: var(--site-radius, 12px);
    padding: 22px 24px;
    margin-bottom: 22px;
    box-shadow: var(--site-shadow);
}

.tool-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.tool-intro-about h2,
.tool-intro-howto h2 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--site-navy, #0c2d4a);
    margin-bottom: 10px;
}

.tool-intro-about p {
    font-size: 0.86rem;
    color: var(--site-text, #1f2d3d);
    line-height: 1.85;
}

.tool-intro-note {
    margin-top: 10px;
    font-size: 0.8rem !important;
    color: var(--site-teal, #2a7a8c) !important;
    font-weight: 600;
}

.tool-intro-howto ol {
    margin: 0;
    padding-right: 20px;
    font-size: 0.84rem;
    line-height: 1.85;
    color: var(--site-muted, #5c6b7a);
}

.tool-intro-howto li {
    margin-bottom: 6px;
}

/* legacy aliases */
.tool-card-top { display: none; }
.tool-card-footer { display: none; }
.tool-card-link { display: none; }
.tool-card-note { display: none; }

.tool-card h2 { font-size: 0.98rem; color: var(--site-navy, #0c2d4a); margin-bottom: 8px; font-weight: 700; }
.tool-card p { font-size: 0.86rem; color: var(--site-muted, #5c6b7a); line-height: 1.75; margin-bottom: 0; }
.tool-card span.link-muted { font-size: 0.84rem; font-weight: 600; color: var(--site-muted, #5c6b7a); }

/* ── Panels (shared) ────────────────────────────────────────────────────── */
.tracker-panel,
.guide-section,
.coach-panel,
.podcast-episode,
.soon-banner {
    background: var(--site-surface, #fff);
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: var(--site-radius, 12px);
    padding: 26px;
    margin-bottom: 22px;
    box-shadow: var(--site-shadow);
}

.tracker-panel h2,
.guide-section h2 {
    font-size: 1.08rem;
    color: var(--site-navy, #0c2d4a);
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--site-accent-soft, #e8f3f7);
    font-weight: 700;
}

/* ── Tracker ────────────────────────────────────────────────────────────── */
.tracker-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.tracker-stat {
    text-align: center;
    padding: 18px 12px;
    background: linear-gradient(180deg, var(--site-bg, #f4f7fa) 0%, #fff 100%);
    border-radius: 12px;
    border: 1px solid var(--site-border, #d8e2ea);
    transition: border-color 0.15s;
}

.tracker-stat:hover {
    border-color: var(--site-teal, #2a7a8c);
}

.tracker-stat strong {
    display: block;
    font-size: 1.75rem;
    color: var(--site-navy, #0c2d4a);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    line-height: 1.2;
}

.tracker-stat span {
    font-size: 0.72rem;
    color: var(--site-muted, #5c6b7a);
    margin-top: 4px;
    display: block;
}

.tracker-form label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--site-navy, #0c2d4a);
    margin-bottom: 6px;
}

.tracker-form input,
.tracker-form select,
.tracker-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    margin-bottom: 16px;
    background: #fff;
    color: var(--site-text, #1f2d3d);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tracker-form input:focus,
.tracker-form select:focus,
.tracker-form textarea:focus {
    outline: none;
    border-color: var(--site-teal, #2a7a8c);
    box-shadow: 0 0 0 3px rgba(42, 122, 140, 0.15);
}

.tracker-form textarea {
    min-height: 88px;
    resize: vertical;
}

.tracker-btn {
    padding: 11px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, var(--site-navy, #0c2d4a), var(--site-blue, #1a4d73));
    color: #fff;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}

.tracker-btn:hover {
    opacity: 0.92;
}

.tracker-btn:active {
    transform: scale(0.98);
}

.tracker-btn-outline {
    background: transparent;
    border: 1px solid var(--site-border, #d8e2ea);
    color: var(--site-navy, #0c2d4a);
    margin-right: 8px;
}

.tracker-btn-outline:hover {
    background: var(--site-bg, #f4f7fa);
    opacity: 1;
}

.journal-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.journal-entry {
    padding: 16px 18px;
    background: var(--site-bg, #f4f7fa);
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: 12px;
    font-size: 0.86rem;
    border-right: 4px solid var(--site-teal, #2a7a8c);
}

.journal-entry-meta {
    font-size: 0.76rem;
    color: var(--site-muted, #5c6b7a);
    margin-bottom: 8px;
}

.journal-empty {
    font-size: 0.86rem;
    color: var(--site-muted, #5c6b7a);
    text-align: center;
    padding: 32px 20px;
    background: var(--site-bg, #f4f7fa);
    border-radius: 12px;
    border: 1px dashed var(--site-border, #d8e2ea);
}

/* ── Blockers guide ─────────────────────────────────────────────────────── */
.guide-section ol,
.guide-section ul {
    padding-right: 24px;
    font-size: 0.88rem;
    line-height: 1.95;
    color: var(--site-text, #1f2d3d);
}

.guide-section li {
    margin-bottom: 10px;
}

.guide-section li strong {
    color: var(--site-navy, #0c2d4a);
}

.guide-note {
    background: var(--site-accent-soft, #e8f3f7);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 0.84rem;
    color: var(--site-navy, #0c2d4a);
    margin-top: 14px;
    line-height: 1.8;
    border-right: 4px solid var(--site-teal, #2a7a8c);
}

/* ── Soon banner ────────────────────────────────────────────────────────── */
.soon-banner {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    text-align: center;
}

.soon-banner .tool-status-soon { margin-bottom: 12px; }
.soon-banner h2 { font-size: 1.12rem; color: var(--site-navy, #0c2d4a); margin-bottom: 10px; }
.soon-banner p { font-size: 0.88rem; color: var(--site-muted, #5c6b7a); line-height: 1.85; }

/* ── Audio ──────────────────────────────────────────────────────────────── */
.audio-session-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 16px;
}

.audio-session-card {
    padding: 20px;
    background: var(--site-bg, #f4f7fa);
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.audio-session-card:hover {
    border-color: var(--site-teal, #2a7a8c);
    box-shadow: 0 4px 16px rgba(12, 45, 74, 0.06);
}

.audio-session-card h3 {
    font-size: 0.94rem;
    color: var(--site-navy, #0c2d4a);
    margin-bottom: 8px;
    font-weight: 700;
}

.audio-session-card p {
    font-size: 0.82rem;
    color: var(--site-muted, #5c6b7a);
    margin-bottom: 14px;
    line-height: 1.7;
}

.audio-play-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    background: var(--site-navy, #0c2d4a);
    color: #fff;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.audio-play-btn:hover {
    background: var(--site-blue, #1a4d73);
}

.audio-play-btn.is-playing {
    background: #991b1b;
}

/* ── Coach ──────────────────────────────────────────────────────────────── */
.coach-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.coach-quick button {
    padding: 9px 14px;
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: 999px;
    background: var(--site-bg, #f4f7fa);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--site-navy, #0c2d4a);
    transition: background 0.15s, border-color 0.15s;
}

.coach-quick button:hover {
    background: var(--site-accent-soft, #e8f3f7);
    border-color: var(--site-teal, #2a7a8c);
}

.coach-chat {
    height: 340px;
    overflow-y: auto;
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: 12px;
    padding: 16px;
    background: var(--site-bg, #f4f7fa);
    margin-bottom: 14px;
}

.coach-msg {
    margin-bottom: 12px;
    max-width: 88%;
}

.coach-msg p {
    font-size: 0.86rem;
    line-height: 1.8;
    padding: 12px 14px;
    border-radius: 12px;
}

.coach-msg-user {
    margin-right: auto;
}

.coach-msg-user p {
    background: var(--site-accent-soft, #e8f3f7);
    color: var(--site-navy, #0c2d4a);
    border: 1px solid rgba(26, 107, 138, 0.15);
}

.coach-msg-bot p {
    background: #fff;
    border: 1px solid var(--site-border, #d8e2ea);
    color: var(--site-text, #1f2d3d);
}

.coach-input-row {
    display: flex;
    gap: 10px;
}

.coach-input-row input {
    flex: 1;
    padding: 11px 14px;
    border: 1px solid var(--site-border, #d8e2ea);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
}

.coach-input-row input:focus {
    outline: none;
    border-color: var(--site-teal, #2a7a8c);
    box-shadow: 0 0 0 3px rgba(42, 122, 140, 0.12);
}

/* ── Podcast ────────────────────────────────────────────────────────────── */
.podcast-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.podcast-num {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--site-teal, #2a7a8c);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.podcast-episode h2 {
    font-size: 1.05rem;
    color: var(--site-navy, #0c2d4a);
    margin: 8px 0;
    font-weight: 700;
}

.podcast-episode p {
    font-size: 0.86rem;
    color: var(--site-muted, #5c6b7a);
    margin-bottom: 12px;
    line-height: 1.75;
}

.podcast-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.78rem;
    color: var(--site-muted, #5c6b7a);
}

/* ── Accountability ───────────────────────────────────────────────────────── */
.accountability-code-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--site-bg, #f4f7fa);
    border: 2px dashed var(--site-teal, #2a7a8c);
    border-radius: 12px;
    margin: 16px 0;
}

.accountability-code-box code {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--site-navy, #0c2d4a);
    font-family: 'Vazirmatn', monospace;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .tools-grid { grid-template-columns: 1fr; }
    .tool-intro-grid { grid-template-columns: 1fr; gap: 18px; }
    .tracker-stats { grid-template-columns: 1fr 1fr; }
    .audio-session-grid { grid-template-columns: 1fr; }
    .tools-page-banner { padding: 28px 20px 32px; }
    .tool-card-foot { flex-wrap: wrap; }
}
