/* Halaman /about — memakai styles.css aplikasi untuk body, tema, topbar, dan tautan kembali. */
.about-page {
    --ab-surface: #1a1a1a;
    --ab-border: #2b2b2b;
    --ab-muted: #b9b9b9;
    --ab-faint: #8a8a8a;
    --ab-code-bg: #141414;
    --ab-link: #8fb6ff;
    --ab-accent: #59a6ff;
    --ab-ayat: #59a6ff;
    --ab-tafsir: #4fbf8f;
    --ab-note: #e0a64a;
    --ab-arabic: #a98bd6;
    --ab-paper: #222222;
    --ab-paper-line: #3a3a3a;
    max-width: 820px;
    line-height: 1.7;
}

body.theme-light .about-page {
    --ab-surface: #ffffff;
    --ab-border: #d4dbe5;
    --ab-muted: #4d607c;
    --ab-faint: #6b7a90;
    --ab-code-bg: #f4f6f9;
    --ab-link: #2f61a8;
    --ab-accent: #3f73bb;
    --ab-ayat: #3f73bb;
    --ab-tafsir: #23845b;
    --ab-note: #b9770e;
    --ab-arabic: #7b5bb0;
    --ab-paper: #fbfbf8;
    --ab-paper-line: #c9d1dc;
}

.about-page a {
    color: var(--ab-link);
}

.about-logo {
    display: block;
    width: 84px;
    height: auto;
    margin: 4px auto 10px;
    filter: invert(1) brightness(0.92);
}

body.theme-light .about-logo {
    filter: none;
}

.about-toolbar {
    margin: 18px 0 8px;
}

.about-toolbar-end {
    margin-top: 28px;
}

body.theme-light .about-page .bookmark-back {
    color: var(--ab-link);
}

.about-section {
    margin-top: 18px;
    padding: 20px 22px;
    background: var(--ab-surface);
    border: 1px solid var(--ab-border);
    border-radius: 12px;
}

.about-section h2 {
    margin: 0 0 10px;
    font-size: 1.25rem;
    line-height: 1.35;
}

.about-section p {
    margin: 0 0 12px;
}

.about-section > :last-child {
    margin-bottom: 0;
}

.about-lead,
.about-caption {
    color: var(--ab-muted);
}

.about-caption {
    font-size: 0.9rem;
}

.about-step {
    scroll-margin-top: 16px;
}

.about-step:target {
    border-color: var(--ab-accent);
}

.about-step-label {
    margin: 0 0 4px !important;
    color: var(--ab-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.about-page code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86em;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--ab-code-bg);
    border: 1px solid var(--ab-border);
    overflow-wrap: anywhere;
}

.about-code {
    margin: 0 0 12px;
    padding: 14px 16px;
    background: var(--ab-code-bg);
    border: 1px solid var(--ab-border);
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.6;
}

.about-code code {
    padding: 0;
    border: 0;
    background: none;
    font-size: inherit;
    white-space: pre;
}

.about-code mark {
    background: none;
    color: var(--ab-ayat);
    font-weight: 700;
}

.about-code mark.mark-alt {
    color: var(--ab-note);
}

.about-list {
    margin: 0 0 12px;
    padding-left: 1.2rem;
}

.about-list li + li {
    margin-top: 6px;
}

/* Statistik */
.about-stats {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.about-stats li {
    padding: 12px 8px;
    border: 1px solid var(--ab-border);
    border-radius: 10px;
    text-align: center;
}

.about-stats strong {
    display: block;
    font-size: 1.3rem;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.about-stats span {
    color: var(--ab-muted);
    font-size: 0.85rem;
}

/* Diagram alur */
.pipeline {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 18px;
}

.pipeline li {
    position: relative;
}

.pipeline li + li::before {
    content: "";
    position: absolute;
    left: -15px;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%);
    background: currentColor;
    color: var(--ab-faint);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 1l5 5-5 5' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 1l5 5-5 5' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.pipeline a {
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 6px;
    border: 1px solid var(--ab-border);
    border-radius: 10px;
    color: inherit;
    text-align: center;
    text-decoration: none;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.pipeline a:hover,
.pipeline a:focus-visible {
    border-color: var(--ab-accent);
    transform: translateY(-2px);
}

.pipeline-num {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--ab-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
}

.pipeline-title {
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.3;
}

.pipeline-meta {
    color: var(--ab-muted);
    font-size: 0.74rem;
    line-height: 1.3;
}

/* Anatomi halaman */
.anatomy {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin: 16px 0;
}

.anatomy-page {
    width: 100%;
    height: auto;
}

.an-paper {
    fill: var(--ab-paper);
    stroke: var(--ab-paper-line);
}

.an-muted { fill: var(--ab-paper-line); }
.an-ayat { fill: var(--ab-ayat); }
.an-tafsir { fill: var(--ab-tafsir); opacity: 0.85; }
.an-note { fill: var(--ab-note); }
.an-arabic { fill: var(--ab-arabic); }

.anatomy-legend {
    list-style: none;
    margin: 0;
    padding: 0;
}

.anatomy-legend li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.92rem;
    line-height: 1.5;
}

.anatomy-legend li + li {
    margin-top: 10px;
}

.anatomy-legend strong {
    display: block;
}

.anatomy-legend div {
    color: var(--ab-muted);
}

.about-page .anatomy-legend strong {
    color: #f2f2f2;
}

body.theme-light .about-page .anatomy-legend strong {
    color: #172233;
}

.sw {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin-top: 4px;
    border-radius: 4px;
}

.sw-muted { background: var(--ab-paper-line); }
.sw-ayat { background: var(--ab-ayat); }
.sw-tafsir { background: var(--ab-tafsir); }
.sw-note { background: var(--ab-note); }
.sw-arabic { background: var(--ab-arabic); }

/* Tabel pembersihan */
.about-table-wrap {
    overflow-x: auto;
}

.about-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.about-table th,
.about-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--ab-border);
    text-align: left;
    vertical-align: top;
}

.about-table th {
    color: var(--ab-muted);
    font-weight: 600;
    font-size: 0.82rem;
}

.about-table tr:last-child td {
    border-bottom: 0;
}

/* Tabel database */
.about-db {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.db-table {
    padding: 10px 12px;
    border: 1px solid var(--ab-border);
    border-radius: 8px;
    font-size: 0.86rem;
    line-height: 1.5;
}

.db-table p {
    margin: 0 !important;
    color: var(--ab-muted);
}

.about-page .db-table .db-name {
    margin-bottom: 4px !important;
    color: var(--ab-accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 700;
}

/* Demo penautan penanda */
.link-demo {
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid var(--ab-border);
    border-radius: 8px;
    background: var(--ab-code-bg);
}

.link-demo-verse {
    font-size: 1.05rem;
}

.link-demo-rules p {
    margin: 6px 0 0 !important;
    font-size: 0.92rem;
}

.tag-tafsir,
.tag-note {
    display: inline-block;
    min-width: 1.1em;
    margin: 0 1px;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    vertical-align: super;
    color: #fff;
}

.link-demo-rules .tag-tafsir,
.link-demo-rules .tag-note {
    vertical-align: baseline;
}

.tag-tafsir { background: var(--ab-tafsir); }
.tag-note { background: var(--ab-note); }

.about-inline-icon {
    font-size: 1.1em;
    vertical-align: -0.18em;
    color: var(--ab-accent);
}

/* Ajakan review */
.about-review {
    border-color: var(--ab-note);
}

.about-help {
    display: grid;
    gap: 8px;
}

.about-help p {
    position: relative;
    margin: 0 !important;
    padding-left: 26px;
}

.about-help p > :first-child {
    position: absolute;
    left: 0;
    top: 0.32em;
}

.about-help .about-inline-icon {
    vertical-align: 0;
    line-height: 1;
}

.about-help-dot {
    left: 3px !important;
    top: 0.5em !important;
    width: 10px;
    height: 10px;
    box-sizing: border-box;
    border-radius: 999px;
    border: 1.5px solid var(--ab-accent);
}

.about-source {
    font-size: 0.92rem;
}

@media (max-width: 760px) {
    .pipeline {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .pipeline li + li::before {
        left: 50%;
        top: -13px;
        transform: translateX(-50%) rotate(90deg);
    }

    .pipeline a {
        flex-direction: row;
        justify-content: flex-start;
        gap: 12px;
        padding: 10px 12px;
        text-align: left;
    }

    .pipeline-meta {
        margin-left: auto;
        text-align: right;
    }

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

    .anatomy-page {
        max-width: 220px;
        margin: 0 auto;
        display: block;
    }

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

    .about-stats li:last-child {
        grid-column: 1 / -1;
    }

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

    .about-section {
        padding: 16px;
    }
}
