/* =========================================================
   ACE GRAMMAR ENGINE — BROKEN PLURAL FLASH CARD
   CLEAN / COMPACT VERSION
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 8px;
    background: #f4f6f8;
    font-family: Arial, Helvetica, sans-serif;
    color: #222;
}


/* =========================================================
   PAGE
   ========================================================= */

.adj-page {
    max-width: 700px;
    margin: 0 auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.adj-header {
    text-align: center;
    margin: 4px 0 8px;
}

.adj-header h1 {
    margin: 0;
    padding: 0;
    font-size: 23px;
    line-height: 1.15;
    color: #1f3c5b;
}

.adj-subtitle {
    margin: 2px 0 0;
    font-size: 14px;
    color: #667788;
}


/* =========================================================
   FLASH CARD
   ========================================================= */

.adj-card {
    max-width: 700px;
    margin: 6px auto;
    background: #fff;
    border: 1px solid #d8dee6;
    border-radius: 9px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}


/* =========================================================
   CARD HEADING
   ========================================================= */

.adj-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 7px 12px;

    background: #1f3c5b;
    color: #fff;

    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.adj-counter {
    padding: 2px 7px;
    background: rgba(255,255,255,.15);
    border-radius: 10px;
    font-size: 12px;
}


/* =========================================================
   MAIN DISPLAY
   ========================================================= */

.adj-main-display {
    padding: 8px 12px 6px;
    text-align: center;
}

.adj-pattern-label {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #68727d;
}


/* Main Arabic broken plural */

.adj-word {
    display: inline-block;

    margin: 0 0 5px;
    padding: 0 8px;

    direction: rtl;

    font-family:
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;

    font-size: 42px;
    line-height: 1.25;
    font-weight: 700;

    color: #111;
    text-decoration: none;
}

.adj-word:hover {
    background: #eef5fa;
    border-radius: 5px;
}


/* =========================================================
   INFORMATION GRID
   ========================================================= */

.adj-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    margin: 4px 0 0;

    border: 1px solid #d8dee6;
    border-radius: 6px;
    overflow: hidden;

    text-align: center;
}

.adj-info-item {
    padding: 5px 7px;
    min-height: 0;

    border-right: 1px solid #e2e6ea;
    border-bottom: 1px solid #e2e6ea;
}

.adj-info-label {
    display: block;

    margin: 0 0 1px;

    font-size: 10px;
    line-height: 1.1;
    font-weight: 700;
    text-transform: uppercase;

    color: #68727d;
}

.adj-info-value {
    display: block;

    margin: 0;

    font-size: 14px;
    line-height: 1.25;
    font-weight: 600;
}

.adj-info-value.arabic {
    direction: rtl;

    font-family:
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;

    font-size: 19px;
    line-height: 1.3;
}

.adj-info-value.urdu {
    direction: rtl;

    font-family:
        "Noto Nastaliq Urdu",
        "Noto Naskh Arabic",
        serif;

    font-size: 16px;
    line-height: 1.4;
}


/* =========================================================
   ROOT
   ========================================================= */

.root-display {
    direction: rtl;

    margin: 0;

    font-family:
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;

    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;
}

.root-display span {
    display: inline-block;
    margin: 0 2px;
}


/* =========================================================
   ROOT COLORS
   ========================================================= */

.r0,
.root-r0 {
    color: #d62828;
    font-weight: 700;
}

.r1,
.root-r1 {
    color: #1565c0;
    font-weight: 700;
}

.r2,
.root-r2 {
    color: #2e7d32;
    font-weight: 700;
}


/* =========================================================
   ROOT LEGEND
   ========================================================= */

.root-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;

    margin: 5px 0 2px;
    padding: 0;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
}

.root-legend span {
    padding: 1px 3px;
}


/* =========================================================
   OLD TABLE SUPPORT
   Keep this if bp-table is still used anywhere
   ========================================================= */

.adj-table {
    width: calc(100% - 20px);
    margin: 8px 10px;
    border-collapse: collapse;
}

.adj-table th,
.adj-table td {
    padding: 5px 8px;
    border: 1px solid #d9dfe5;
}

.adj-table th {
    width: 125px;
    text-align: left;
    background: #eef2f5;
    color: #334455;
    font-size: 12px;
}

.adj-table td {
    background: #fff;
    font-size: 14px;
}

.adj-table .arabic {
    direction: rtl;
    text-align: right;

    font-family:
        "Noto Naskh Arabic",
        "Traditional Arabic",
        serif;

    font-size: 20px;
}

.adj-table .urdu {
    direction: rtl;
    text-align: right;

    font-family:
        "Noto Nastaliq Urdu",
        "Noto Naskh Arabic",
        serif;

    font-size: 16px;
}


/* =========================================================
   PREVIOUS / NEXT NAVIGATION
   ========================================================= */

.adj-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;

    padding: 6px 10px;

    border-top: 1px solid #d8dee6;
    background: #f8f9fa;
}

.adj-nav-button {
    display: inline-block;

    padding: 5px 9px;

    border: 1px solid #ccd3da;
    border-radius: 5px;

    text-decoration: none;

    font-size: 12px;
    font-weight: 600;

    color: #222;
    background: #fff;
}

.adj-nav-button:first-child {
    justify-self: start;
}

.adj-nav-button:last-child {
    justify-self: end;
}

.adj-nav-button:hover {
    background: #eef2f5;
}

.adj-nav-status {
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    color: #566573;
    white-space: nowrap;
}


/* =========================================================
   REMOVE DEFAULT EMPTY SPACE
   ========================================================= */

.adj-card p,
.adj-card h1,
.adj-card h2,
.adj-card h3 {
    margin-top: 0;
}

.adj-card > *:first-child {
    margin-top: 0;
}

.adj-card > *:last-child {
    margin-bottom: 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    body {
        padding: 4px;
    }

    .adj-header {
        margin-bottom: 5px;
    }

    .adj-header h1 {
        font-size: 20px;
    }

    .adj-card {
        margin: 4px auto;
        border-radius: 7px;
    }

    .adj-card-heading {
        padding: 6px 9px;
    }

    .adj-main-display {
        padding: 6px 8px 4px;
    }

    .adj-word {
        font-size: 36px;
        margin-bottom: 3px;
    }

    .adj-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .adj-info-item {
        padding: 4px 5px;
    }

    .root-legend {
        gap: 8px;
        flex-wrap: wrap;
        margin-top: 4px;
    }

    .adj-navigation {
        padding: 5px 7px;
        gap: 5px;
    }

    .adj-nav-button {
        padding: 4px 7px;
    }

    .adj-nav-status {
        font-size: 10px;
    }
}
.adj-word {
    display: block;
    text-align: center;
    direction: rtl;
}