/*
 * Cek Weton Jawa – tampilan responsif yang menyatu dengan Nyarink SEO Gold.
 * Seluruh aset lokal; tanpa CDN, font eksternal, atau framework CSS.
 */

/* ========== Base dan token warna ========== */
.cwj-app,
.cwj-app * {
    box-sizing: border-box;
}

.cwj-app {
    --cwj-surface: var(--nsg-surface, #ffffff);
    --cwj-text: var(--nsg-text, #252017);
    --cwj-text-strong: #211b13;
    --cwj-ink: #17130d;
    --cwj-button-text: #171008;
    --cwj-muted: var(--nsg-muted, #6b6255);
    --cwj-muted-2: #5f5547;
    --cwj-muted-3: #4f473c;
    --cwj-dark: var(--nsg-dark, #11100e);
    --cwj-gold: var(--nsg-accent, #c99b3d);
    --cwj-gold-deep: #876822;
    --cwj-gold-light: #f4cf7b;
    --cwj-border: var(--nsg-border, #e5dccd);
    --cwj-border-strong: #cfc3b0;
    --cwj-summary-text: #f7f0e4;
    --cwj-summary-muted: #e1d8ca;
    --cwj-summary-subtle: #d2c8b8;
    --cwj-summary-shift: #f2e3c4;
    --cwj-summary-divider: rgba(244, 207, 123, .42);
    --cwj-summary-column-divider: rgba(244, 207, 123, .22);
    --cwj-quote-bg: #f3ede1;
    --cwj-quote-text: #4a4033;
    --cwj-danger: #a83d35;
    --cwj-danger-bg: #f7e7e4;
    --cwj-danger-text: #6d241f;
    --cwj-focus: rgba(201, 155, 61, .24);
    --cwj-focus-strong: rgba(201, 155, 61, .32);
    --cwj-select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' stroke='%236b6255' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cwj-text);
    font-family: inherit;
    font-size: inherit;
    line-height: 1.75;
    isolation: isolate;
}

.cwj-app h2,
.cwj-app h3,
.cwj-app h4,
.cwj-app p,
.cwj-app ul,
.cwj-app blockquote,
.cwj-app fieldset {
    margin-top: 0;
}

.cwj-app h2,
.cwj-app h3,
.cwj-app h4 {
    color: var(--cwj-text);
    line-height: 1.28;
    letter-spacing: normal;
    overflow-wrap: anywhere;
}

/* Nyarink SEO Gold menambahkan garis dekoratif pada heading. */
.cwj-app h2::after,
.cwj-app h3::after,
.cwj-app h4::after {
    display: none !important;
    content: none !important;
}

.cwj-app .cwj-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;
}

/* ========== Hero ========== */
.cwj-app .cwj-hero {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.cwj-app .cwj-eyebrow,
.cwj-app .cwj-section-kicker,
.cwj-app .cwj-summary-label {
    display: block;
    margin: 0 0 7px;
    color: var(--cwj-gold-deep);
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .09em;
    line-height: 1.45;
    text-transform: uppercase;
}

.cwj-app .cwj-title {
    margin: 0 0 10px;
    color: var(--cwj-ink);
    font-size: clamp(1.65rem, 4vw, 2.25rem);
    line-height: 1.2;
}

.cwj-app .cwj-intro {
    max-width: 760px;
    margin: 0;
    color: var(--cwj-muted);
    font-size: 1rem;
}

/* ========== Form ========== */
.cwj-app .cwj-form {
    width: 100%;
    margin: 24px 0 0;
    padding: 24px 0;
    border-top: 1px solid var(--cwj-border);
    border-right: 0;
    border-bottom: 1px solid var(--cwj-border);
    border-left: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.cwj-app .cwj-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.cwj-app .cwj-label {
    display: block;
    margin: 0 0 8px;
    padding: 0;
    color: var(--cwj-text);
    font-size: .96rem;
    font-weight: 750;
}

.cwj-app .cwj-time-label {
    margin-top: 18px;
}

.cwj-app .cwj-date-grid {
    display: grid;
    grid-template-columns: minmax(72px, .8fr) minmax(122px, 1.45fr) minmax(88px, 1fr);
    gap: 10px;
    width: 100%;
    margin: 0 0 6px;
}

.cwj-app .cwj-date-grid > div {
    min-width: 0;
}

.cwj-app .cwj-select {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 48px;
    margin: 0 0 18px;
    padding: 10px 38px 10px 12px;
    border: 1px solid var(--cwj-border-strong);
    border-radius: 8px;
    background-color: var(--cwj-surface);
    background-image: var(--cwj-select-arrow);
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 9px;
    color: var(--cwj-text-strong);
    font: inherit;
    font-size: 16px;
    line-height: 1.25;
    box-shadow: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.cwj-app .cwj-select::-ms-expand {
    display: none;
}

.cwj-app .cwj-date-grid .cwj-select {
    min-width: 0;
    margin-bottom: 0;
}

.cwj-app .cwj-select:focus {
    border-color: var(--cwj-gold);
    outline: 3px solid var(--cwj-focus);
    outline-offset: 1px;
}

.cwj-app .cwj-help {
    margin: 6px 0 18px;
    color: var(--cwj-muted);
    font-size: .88rem;
    line-height: 1.6;
}

.cwj-app .cwj-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 340px);
    min-height: 50px;
    margin: 0;
    padding: 12px 20px;
    border: 0;
    border-radius: 8px;
    background: var(--cwj-gold);
    color: var(--cwj-button-text);
    font: inherit;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transition: filter .18s ease, transform .18s ease;
}

.cwj-app .cwj-button:hover,
.cwj-app .cwj-button:focus-visible {
    color: var(--cwj-button-text);
    filter: brightness(.96);
    transform: translateY(-1px);
}

.cwj-app .cwj-button:focus-visible {
    outline: 3px solid var(--cwj-focus-strong);
    outline-offset: 3px;
}

.cwj-app .cwj-alert {
    margin: 16px 0 0;
    padding: 11px 14px;
    border-left: 4px solid var(--cwj-danger);
    border-radius: 0;
    background: var(--cwj-danger-bg);
    color: var(--cwj-danger-text);
}

/* ========== Hasil dan ringkasan ========== */
.cwj-app .cwj-results {
    width: 100%;
    margin: 32px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cwj-text);
    scroll-margin-top: 24px;
}

.cwj-app .cwj-results h3,
.cwj-app .cwj-results h4 {
    color: var(--cwj-text-strong);
}

.cwj-app .cwj-summary-card {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: clamp(24px, 4vw, 44px);
    align-items: start;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: clamp(24px, 4vw, 38px);
    overflow: hidden;
    border: 0;
    border-left: 4px solid var(--cwj-gold);
    border-radius: 0;
    background: var(--cwj-dark);
    color: var(--cwj-summary-text);
    box-shadow: none;
}

.cwj-app .cwj-summary-card > div,
.cwj-app .cwj-stat-grid,
.cwj-app .cwj-stat {
    min-width: 0;
}

.cwj-app .cwj-summary-card .cwj-summary-label {
    color: var(--cwj-gold-light);
}

.cwj-app .cwj-summary-card h3 {
    margin: 4px 0 6px;
    color: var(--cwj-gold-light);
    font-size: clamp(2rem, 6vw, 3.55rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.cwj-app .cwj-summary-card p {
    margin-bottom: 0;
    color: var(--cwj-summary-muted);
    overflow-wrap: anywhere;
}

.cwj-app .cwj-shift {
    margin-top: 14px;
    padding: 8px 0 8px 13px;
    border-left: 3px solid var(--cwj-gold);
    background: transparent;
    color: var(--cwj-summary-shift);
    font-size: .92rem;
    overflow-wrap: anywhere;
}

.cwj-app .cwj-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
    padding-left: clamp(22px, 3vw, 34px);
    border-left: 1px solid var(--cwj-summary-column-divider);
}

.cwj-app .cwj-stat {
    padding: 0 0 0 16px;
    border: 0;
    border-left: 1px solid var(--cwj-summary-divider);
    border-radius: 0;
    background: transparent;
}

.cwj-app .cwj-stat span {
    display: block;
    color: var(--cwj-summary-subtle);
    font-size: .8rem;
}

.cwj-app .cwj-stat strong {
    display: block;
    margin: 3px 0 6px;
    color: var(--cwj-gold-light);
    font-size: clamp(1.45rem, 4vw, 2rem);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.cwj-app .cwj-stat small {
    display: block;
    color: var(--cwj-summary-muted);
    font-size: .82rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

/* ========== Kesimpulan dan insight ========== */
.cwj-app .cwj-insight,
.cwj-app .cwj-meaning,
.cwj-app .cwj-elements {
    width: 100%;
    margin: 36px 0 0;
    padding: 32px 0 0;
    border: 0;
    border-top: 1px solid var(--cwj-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.cwj-app .cwj-section-kicker {
    color: var(--cwj-gold-deep);
}

.cwj-app .cwj-insight > h3,
.cwj-app .cwj-meaning > h3,
.cwj-app .cwj-elements > h3 {
    margin: 3px 0 16px;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
}

.cwj-app .cwj-insight > p {
    color: var(--cwj-muted-3);
}

.cwj-app .cwj-insight-grid,
.cwj-app .cwj-meaning-grid {
    display: grid;
    gap: 26px;
    margin-top: 24px;
}

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

.cwj-app .cwj-meaning-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cwj-app .cwj-insight-grid > div,
.cwj-app .cwj-meaning-grid > article {
    min-width: 0;
    margin: 0;
    padding: 0 0 0 17px;
    border: 0;
    border-left: 3px solid var(--cwj-border);
    border-radius: 0;
    background: transparent;
}

.cwj-app .cwj-insight-grid h4,
.cwj-app .cwj-meaning-grid h4 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.cwj-app .cwj-insight-grid p,
.cwj-app .cwj-meaning-grid p {
    margin-bottom: 0;
    color: var(--cwj-muted-2);
    overflow-wrap: anywhere;
}

.cwj-app .cwj-insight-grid ul {
    margin: 0;
    padding-left: 1.25rem;
}

.cwj-app .cwj-insight-grid li + li {
    margin-top: 7px;
}

.cwj-app .cwj-insight blockquote {
    margin: 26px 0 0;
    padding: 18px 20px;
    border: 0;
    border-left: 4px solid var(--cwj-gold);
    border-radius: 0;
    background: var(--cwj-quote-bg);
    color: var(--cwj-quote-text);
}

.cwj-app .cwj-insight blockquote p {
    margin-bottom: 5px;
    font-size: 1.05rem;
}

.cwj-app .cwj-insight blockquote footer {
    color: var(--cwj-muted);
    font-size: .9rem;
}

/* ========== Makna weton ========== */
.cwj-app .cwj-meaning-grid > article {
    overflow-wrap: anywhere;
}

/* ========== Kartu unsur petungan ========== */
.cwj-app .cwj-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 30px;
    row-gap: 0;
    margin-top: 22px;
    border-top: 1px solid var(--cwj-border);
}

.cwj-app .cwj-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 15px;
    align-items: start;
    min-width: 0;
    margin: 0;
    padding: 20px 0;
    border: 0;
    border-bottom: 1px solid var(--cwj-border);
    border-radius: 0;
    background: transparent;
}

.cwj-app .cwj-card > div {
    min-width: 0;
}

.cwj-app .cwj-card img {
    display: block;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    object-fit: contain;
}

.cwj-app .cwj-card span {
    display: block;
    color: var(--cwj-gold-deep);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1.4;
    text-transform: uppercase;
}

.cwj-app .cwj-card h4 {
    margin: 3px 0 6px;
    font-size: 1.08rem;
    overflow-wrap: anywhere;
}

.cwj-app .cwj-card p {
    margin: 0;
    color: var(--cwj-muted-2);
    font-size: .95rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* ========== Disclaimer ========== */
.cwj-app .cwj-disclaimer {
    margin: 30px 0 0;
    padding: 16px 0;
    border-top: 1px solid var(--cwj-border);
    border-right: 0;
    border-bottom: 1px solid var(--cwj-border);
    border-left: 0;
    border-radius: 0;
    background: transparent;
    color: var(--cwj-muted);
    font-size: .9rem;
    line-height: 1.65;
}

/* ========== Tablet: 601–760px ========== */
@media (min-width: 601px) and (max-width: 760px) {
    .cwj-app .cwj-summary-card {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 26px 22px;
    }

    .cwj-app .cwj-stat-grid {
        padding-left: 0;
        border-left: 0;
    }

    .cwj-app .cwj-insight-grid,
    .cwj-app .cwj-meaning-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

/* ========== Mobile: maksimal 600px ========== */
@media (max-width: 600px) {
    .cwj-app {
        line-height: 1.68;
    }

    .cwj-app .cwj-title {
        font-size: 1.6rem;
    }

    .cwj-app .cwj-form {
        margin-top: 20px;
        padding: 20px 0;
    }

    .cwj-app .cwj-date-grid {
        grid-template-columns: minmax(64px, .78fr) minmax(110px, 1.42fr) minmax(78px, .95fr);
        gap: 7px;
    }

    .cwj-app .cwj-select {
        min-height: 46px;
        padding: 9px 30px 9px 9px;
        background-position: right 9px center;
        background-size: 12px 8px;
    }

    .cwj-app .cwj-button {
        width: 100%;
    }

    .cwj-app .cwj-results {
        margin-top: 26px;
    }

    .cwj-app .cwj-summary-card {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 20px;
    }

    .cwj-app .cwj-stat-grid,
    .cwj-app .cwj-insight-grid,
    .cwj-app .cwj-meaning-grid,
    .cwj-app .cwj-card-grid {
        grid-template-columns: 1fr;
    }

    .cwj-app .cwj-stat-grid {
        gap: 18px;
        padding-left: 0;
        border-left: 0;
    }

    .cwj-app .cwj-insight,
    .cwj-app .cwj-meaning,
    .cwj-app .cwj-elements {
        margin-top: 30px;
        padding-top: 26px;
    }

    .cwj-app .cwj-insight-grid,
    .cwj-app .cwj-meaning-grid {
        gap: 0;
        margin-top: 20px;
        border-top: 1px solid var(--cwj-border);
    }

    .cwj-app .cwj-insight-grid > div,
    .cwj-app .cwj-meaning-grid > article {
        padding: 18px 0;
        border-left: 0;
        border-bottom: 1px solid var(--cwj-border);
    }

    .cwj-app .cwj-card-grid {
        column-gap: 0;
    }

    .cwj-app .cwj-card {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 12px;
        padding: 18px 0;
    }

    .cwj-app .cwj-card img {
        width: 42px;
        height: 42px;
    }
}

/* ========== Ponsel sangat kecil ========== */
@media (max-width: 370px) {
    .cwj-app .cwj-date-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cwj-app .cwj-date-grid .cwj-select {
        margin-bottom: 0;
    }

    .cwj-app .cwj-summary-card {
        padding: 20px 16px;
        border-left-width: 3px;
    }

    .cwj-app .cwj-summary-card h3 {
        font-size: clamp(1.75rem, 12vw, 2.35rem);
    }

    .cwj-app .cwj-stat {
        padding-left: 12px;
    }

    .cwj-app .cwj-card {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 10px;
    }

    .cwj-app .cwj-card img {
        width: 38px;
        height: 38px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cwj-app .cwj-button {
        transition: none;
    }
}