/* =====================================================================
   MentorMakers.pk — 2026 Design System
   Loads after mm-legacy.css. Every new component is prefixed (mmh-,
   mmm-, mms-, mmd-, mmb-, tp-, cat-, mmf-) so nothing collides with
   older page styles.
   ===================================================================== */

:root {
    --mm-primary: #4F46E5;
    --mm-primary-2: #7C3AED;
    --mm-grad: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    --mm-ink: #0F172A;
    --mm-ink-2: #1E1B4B;
    --mm-text: #334155;
    --mm-muted: #64748B;
    --mm-faint: #94A3B8;
    --mm-bg: #F7F7FC;
    --mm-surface: #FFFFFF;
    --mm-soft: #F5F3FF;
    --mm-line: #E9EAF3;
    --mm-line-2: #F1F0FB;
    --mm-ok: #16A34A;
    --mm-warn: #D97706;
    --mm-err: #DC2626;
    --mm-r-sm: 10px;
    --mm-r: 14px;
    --mm-r-lg: 20px;
    --mm-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -16px rgba(49, 46, 129, .22);
    --mm-shadow-lg: 0 24px 60px -28px rgba(49, 46, 129, .38);
    --mm-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mm-font-head: 'Sora', 'Inter', system-ui, sans-serif;
    --mm-header-h: 68px;
    /* legacy variables re-pointed to the new palette */
    --primary: #4F46E5;
    --text: #0F172A;
    --muted: #64748B;
    --border: #E9EAF3;
    --bg: #F7F7FC;
}

html { scroll-padding-top: calc(var(--mm-header-h) + 12px); }
body { font-family: var(--mm-font); background: var(--mm-bg); color: var(--mm-ink); -webkit-font-smoothing: antialiased; }
html[lang="ur"] body { font-family: 'Noto Nastaliq Urdu', var(--mm-font); }
h1, h2, h3 { font-family: var(--mm-font-head); color: var(--mm-ink); letter-spacing: -.015em; }
a { color: var(--mm-primary); }
:focus-visible { outline: 3px solid rgba(124, 58, 237, .45); outline-offset: 2px; border-radius: 6px; }
.mm-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mm-wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ---------- Legacy components, refreshed ---------- */
main.container { max-width: 1320px; padding-top: 22px; }
.card { background: #fff; border: 1px solid var(--mm-line); border-radius: var(--mm-r-lg); box-shadow: var(--mm-shadow); }
.btn { background: var(--mm-grad); border: 0; border-radius: 12px; font-weight: 700; box-shadow: 0 10px 22px -12px rgba(79, 70, 229, .7);
    transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(79, 70, 229, .75); }
.btn-danger { background: #DC2626 !important; }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=password], input[type=date],
input[type=time], input[type=search], input[type=tel], textarea, select {
    border: 1.5px solid #E2E8F0; border-radius: 12px; background: #fff; font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #7C3AED; box-shadow: 0 0 0 3px rgba(124, 58, 237, .14); }
.errors { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; border-radius: 14px; padding: 12px 16px; }
.status { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; border-radius: 14px; padding: 12px 16px; }

/* =====================================================================
   HEADER
   ===================================================================== */
.mmh { position: sticky; top: 0; z-index: 900; background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid var(--mm-line); }
.mmh-bar { display: flex; align-items: center; gap: 18px; height: var(--mm-header-h); }
.mmh-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.mmh-brand img { display: block; width: auto; }
.mmh-brand-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--mm-grad); color: #fff;
    display: flex; align-items: center; justify-content: center; font-family: var(--mm-font-head); font-weight: 800; font-size: 1.15rem; }
.mmh-brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.mmh-brand-txt b { font-family: var(--mm-font-head); font-size: 1.12rem; color: var(--mm-ink-2); font-weight: 800; }
.mmh-brand-txt small { font-size: .7rem; color: var(--mm-muted); font-weight: 500; }

.mmh-nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
.mmh-link, .mmh-drop-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px;
    font-size: .9rem; font-weight: 600; color: var(--mm-ink-2); text-decoration: none; background: none; border: 0;
    cursor: pointer; font-family: inherit; white-space: nowrap; transition: background .14s ease, color .14s ease; }
.mmh-link:hover, .mmh-drop-btn:hover, .mmh-link.is-active, .mmh-drop.is-open > .mmh-drop-btn { background: var(--mm-soft); color: var(--mm-primary); }
.mmh-drop-btn svg { transition: transform .15s ease; }
.mmh-drop.is-open > .mmh-drop-btn svg { transform: rotate(180deg); }
.mmh-new { font-size: .62rem; font-weight: 800; color: #fff; background: var(--mm-grad); border-radius: 999px; padding: 2px 7px; letter-spacing: .02em; }
.mmh-drop { position: relative; }

.mmh-spacer { flex: 1; }
.mmh-search { position: relative; width: 300px; }
.mmh-search-btn { width: 100%; display: flex; align-items: center; gap: 9px; background: #F1F5F9; border: 1px solid transparent;
    border-radius: 12px; padding: 9px 12px; color: var(--mm-muted); font-size: .86rem; cursor: pointer; font-family: inherit; text-align: left; }
.mmh-search-btn:hover { border-color: #C7D2FE; background: #fff; }
.mmh-kbd { margin-left: auto; font-size: .68rem; font-weight: 700; color: var(--mm-muted); background: #fff; border: 1px solid var(--mm-line);
    border-radius: 6px; padding: 2px 6px; }
.mmh-icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center;
    justify-content: center; color: var(--mm-ink-2); background: none; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.mmh-icon-btn:hover { background: var(--mm-soft); color: var(--mm-primary); }
.mmh-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: #EF4444; border: 2px solid #fff; }
.mmh-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--mm-grad); color: #fff; font-weight: 700; font-size: .88rem;
    padding: 10px 18px; border-radius: 12px; text-decoration: none; box-shadow: 0 10px 22px -12px rgba(79, 70, 229, .8); white-space: nowrap; }
.mmh-cta:hover { color: #fff; transform: translateY(-1px); }
.mmh-ghost { font-weight: 700; font-size: .88rem; color: var(--mm-ink-2); text-decoration: none; padding: 9px 12px; border-radius: 10px; }
.mmh-ghost:hover { background: var(--mm-soft); color: var(--mm-primary); }

.mmh-user { position: relative; }
.mmh-user-btn { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--mm-line); border-radius: 14px;
    padding: 5px 10px 5px 5px; cursor: pointer; font-family: inherit; }
.mmh-user-btn:hover { border-color: #C7D2FE; }
.mmh-avatar { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; background: var(--mm-grad); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .9rem; flex-shrink: 0; }
.mmh-user-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.mmh-user-txt b { font-size: .84rem; color: var(--mm-ink); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mmh-user-txt small { font-size: .7rem; color: var(--mm-muted); }
.mmh-panel { position: absolute; top: calc(100% + 10px); right: 0; min-width: 250px; background: #fff; border: 1px solid var(--mm-line);
    border-radius: 16px; box-shadow: var(--mm-shadow-lg); padding: 8px; display: none; z-index: 950; }
.mmh-user.is-open .mmh-panel, .mmh-drop.is-open > .mmh-panel { display: block; }
.mmh-panel-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--mm-line-2); margin-bottom: 6px; }
.mmh-panel-head b { display: block; font-size: .9rem; }
.mmh-panel-head span { font-size: .78rem; color: var(--mm-muted); word-break: break-all; }
.mmh-panel a, .mmh-panel button.mmh-panel-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px;
    font-size: .87rem; font-weight: 600; color: var(--mm-ink-2); text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.mmh-panel a:hover, .mmh-panel button.mmh-panel-item:hover { background: var(--mm-soft); color: var(--mm-primary); }
.mmh-panel a small { margin-left: auto; font-size: .7rem; font-weight: 800; background: #EF4444; color: #fff; border-radius: 999px; padding: 1px 7px; }
.mmh-panel-sep { height: 1px; background: var(--mm-line-2); margin: 6px 4px; }
.mmh-panel-lang { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: .84rem; font-weight: 600; color: var(--mm-muted); }
.mmh-pills { display: inline-flex; background: #F1F5F9; border-radius: 999px; padding: 3px; gap: 2px; }
.mmh-pills a { padding: 4px 11px !important; border-radius: 999px !important; font-size: .76rem !important; width: auto !important; }
.mmh-pills a.is-on { background: #fff; color: var(--mm-primary); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.mmh-panel-small { min-width: 230px; left: 0; right: auto; }

.mmh-burger, .mmh-msearch { display: none; }

/* =====================================================================
   MEGA MENU (Tools)
   ===================================================================== */
.mmm { position: fixed; left: 0; right: 0; top: var(--mm-header-h); z-index: 890; display: none; padding: 0 24px; }
.mmm.is-open { display: block; }
.mmm-inner { max-width: 1320px; margin: 12px auto 0; background: #fff; border: 1px solid var(--mm-line); border-radius: 22px;
    box-shadow: var(--mm-shadow-lg); display: grid; grid-template-columns: 1.05fr 1.15fr 1.1fr 1fr 1fr 1.1fr; max-height: calc(100vh - var(--mm-header-h) - 36px); overflow-y: auto; }
.mmm-col { padding: 22px 18px; border-right: 1px solid var(--mm-line-2); min-width: 0; }
.mmm-col:last-child { border-right: 0; }
.mmm-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.mmm-h b { display: flex; align-items: center; gap: 7px; font-family: var(--mm-font-head); font-size: 1rem; color: var(--mm-ink); }
.mmm-h small { display: block; font-size: .74rem; color: var(--mm-muted); font-weight: 500; margin-top: 2px; font-family: var(--mm-font); }
.mmm-h a { color: var(--mm-primary); text-decoration: none; font-weight: 800; }
.mmm-cat { display: flex; align-items: center; gap: 11px; padding: 8px 9px; border-radius: 11px; text-decoration: none; color: var(--mm-ink-2);
    font-weight: 600; font-size: .88rem; }
.mmm-cat:hover, .mmm-cat.is-first { background: var(--mm-soft); color: var(--mm-primary); }
.mmm-cat em { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; color: var(--mm-muted); background: #F1F5F9; border-radius: 999px; padding: 2px 8px; }
.mmm-ic { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.mmm-item { display: flex; gap: 11px; padding: 8px 9px; border-radius: 11px; text-decoration: none; }
.mmm-item:hover { background: var(--mm-soft); }
.mmm-item .mmm-t { display: block; font-size: .86rem; font-weight: 700; color: var(--mm-ink); line-height: 1.3; }
.mmm-item .mmm-d { display: block; font-size: .74rem; color: var(--mm-muted); line-height: 1.35; margin-top: 1px; }
.mmm-item svg { flex-shrink: 0; }
.mmm-soft { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mmm-promo { background: linear-gradient(160deg, #F5F3FF 0%, #EEF2FF 55%, #E0E7FF 100%); margin: 12px; border-radius: 18px; border-right: 0 !important; }
.mmm-promo h3 { font-size: 1.05rem; margin: 0 0 2px; }
.mmm-promo h3 span { display: block; font-size: 1.45rem; background: var(--mm-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.mmm-promo p { font-size: .8rem; color: var(--mm-muted); margin: 6px 0 12px; }
.mmm-checks { list-style: none; padding: 0; margin: 0 0 16px; }
.mmm-checks li { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--mm-ink-2); padding: 3px 0; }
.mmm-checks li::before { content: ''; width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    background: var(--mm-primary) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3.2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 12l5 5L20 7"/></svg>') center / 11px no-repeat; }
.mmm-promo .mmh-cta { width: 100%; justify-content: center; }
.mmm-scrim { position: fixed; inset: var(--mm-header-h) 0 0 0; background: rgba(15, 23, 42, .18); z-index: 880; display: none; }
.mmm-scrim.is-open { display: block; }

/* =====================================================================
   SEARCH PALETTE
   ===================================================================== */
.mms { position: fixed; inset: 0; z-index: 1200; display: none; background: rgba(15, 23, 42, .45); backdrop-filter: blur(4px); padding: 9vh 16px 16px; }
.mms.is-open { display: block; }
.mms-box { max-width: 640px; margin: 0 auto; background: #fff; border-radius: 20px; box-shadow: var(--mm-shadow-lg); overflow: hidden; }
.mms-field { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--mm-line-2); }
.mms-field input { flex: 1; border: 0 !important; box-shadow: none !important; font-size: 1rem; padding: 6px 0 !important; background: transparent; margin: 0; }
.mms-close { background: #F1F5F9; border: 0; border-radius: 8px; font-size: .74rem; font-weight: 700; color: var(--mm-muted); padding: 5px 9px; cursor: pointer; }
.mms-tabs { display: flex; gap: 6px; padding: 10px 16px 0; }
.mms-tab { border: 1px solid var(--mm-line); background: #fff; border-radius: 999px; font-size: .76rem; font-weight: 700; color: var(--mm-muted);
    padding: 5px 12px; cursor: pointer; font-family: inherit; }
.mms-tab.is-on { background: var(--mm-primary); color: #fff; border-color: var(--mm-primary); }
.mms-list { max-height: 56vh; overflow-y: auto; padding: 8px; }
.mms-row { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; text-decoration: none; color: inherit; }
.mms-row:hover, .mms-row.is-active { background: var(--mm-soft); }
.mms-row b { display: block; font-size: .9rem; color: var(--mm-ink); }
.mms-row span.mms-d { display: block; font-size: .77rem; color: var(--mm-muted); }
.mms-row em { margin-left: auto; font-style: normal; font-size: .68rem; font-weight: 700; color: var(--mm-muted); background: #F1F5F9; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.mms-label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--mm-faint); padding: 10px 10px 4px; }
.mms-empty { padding: 26px 16px; text-align: center; color: var(--mm-muted); font-size: .9rem; }
.mms-ai { display: flex; align-items: center; gap: 12px; margin: 6px 8px 10px; padding: 12px 14px; border-radius: 14px; text-decoration: none;
    background: linear-gradient(135deg, #EEF2FF, #F5F3FF); border: 1px solid #DDD6FE; color: var(--mm-ink-2); }
.mms-ai b { display: block; font-size: .88rem; color: var(--mm-primary); }
.mms-ai span { font-size: .78rem; color: var(--mm-muted); }

/* =====================================================================
   MOBILE DRAWER + BOTTOM NAV + CATEGORY SHEET
   ===================================================================== */
.mmd { position: fixed; inset: 0; z-index: 1100; display: none; }
.mmd.is-open { display: block; }
.mmd-scrim { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.mmd-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); background: #fff; display: flex; flex-direction: column;
    box-shadow: 20px 0 60px rgba(0, 0, 0, .2); animation: mmdIn .22s ease; }
html[dir="rtl"] .mmd-panel { left: auto; right: 0; }
@keyframes mmdIn { from { transform: translateX(-24px); opacity: .6; } to { transform: none; opacity: 1; } }
.mmd-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--mm-line-2); }
.mmd-body { flex: 1; overflow-y: auto; padding: 10px 12px 18px; }
.mmd-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: .94rem;
    color: var(--mm-ink-2); text-decoration: none; width: 100%; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; }
.mmd-link:hover, .mmd-link.is-active { background: var(--mm-soft); color: var(--mm-primary); }
.mmd-link svg:first-child { color: var(--mm-muted); flex-shrink: 0; }
.mmd-link .mmd-chev { margin-left: auto; transition: transform .15s ease; }
.mmd-group.is-open .mmd-chev { transform: rotate(180deg); }
.mmd-sub { display: none; padding: 2px 0 6px 20px; }
.mmd-group.is-open .mmd-sub { display: block; }
.mmd-sub a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: .88rem; font-weight: 600; color: var(--mm-text); text-decoration: none; }
.mmd-sub a:hover { background: var(--mm-soft); color: var(--mm-primary); }
.mmd-sub a em { margin-left: auto; font-style: normal; font-size: .7rem; color: var(--mm-muted); }
.mmd-promo { margin: 14px 4px 6px; padding: 16px; border-radius: 16px; background: linear-gradient(135deg, #EEF2FF, #F5F3FF); border: 1px solid #DDD6FE; display: flex; align-items: center; gap: 12px; }
.mmd-promo b { display: block; color: var(--mm-primary); font-size: .95rem; }
.mmd-promo span { font-size: .78rem; color: var(--mm-muted); }
.mmd-foot { padding: 14px 18px; border-top: 1px solid var(--mm-line-2); font-size: .76rem; color: var(--mm-muted); text-align: center; }
.mmd-account { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 4px 0 8px; border-radius: 14px; background: var(--mm-bg); }
.mmd-account b { display: block; font-size: .9rem; }
.mmd-account span { font-size: .76rem; color: var(--mm-muted); word-break: break-all; }
.mmd-auth { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 10px; }
.mmd-auth a { text-align: center; padding: 11px; border-radius: 12px; font-weight: 700; font-size: .9rem; text-decoration: none; border: 1.5px solid var(--mm-line); color: var(--mm-ink-2); }
.mmd-auth a.is-primary { background: var(--mm-grad); color: #fff; border-color: transparent; }

.mmb { display: none; }
.mmsheet { position: fixed; inset: 0; z-index: 1050; display: none; }
.mmsheet.is-open { display: block; }
.mmsheet-panel { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 22px 22px 0 0; padding: 10px 16px calc(84px + env(safe-area-inset-bottom));
    max-height: 78vh; overflow-y: auto; animation: mmsUp .2s ease; }
@keyframes mmsUp { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.mmsheet-grab { width: 42px; height: 5px; border-radius: 99px; background: #E2E8F0; margin: 4px auto 12px; }
.mmsheet h3 { font-size: 1.05rem; margin: 0 0 10px; }

/* =====================================================================
   TOOL PAGE TEMPLATE (applies to all tools automatically)
   ===================================================================== */
.tp { display: grid; grid-template-columns: 250px minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.tp-left { position: sticky; top: calc(var(--mm-header-h) + 16px); max-height: calc(100vh - var(--mm-header-h) - 32px); overflow-y: auto; scrollbar-width: thin; }
.tp-right { position: sticky; top: calc(var(--mm-header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.tp-nav-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--mm-line); border-radius: 12px; padding: 9px 12px; margin-bottom: 12px; color: var(--mm-muted); cursor: pointer; font-size: .86rem; width: 100%; font-family: inherit; }
.tp-nav-search:hover { border-color: #C7D2FE; }
.tp-nav a.tp-nav-cat, .tp-nav button.tp-nav-cat { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; font-weight: 600; font-size: .88rem;
    color: var(--mm-ink-2); text-decoration: none; width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
.tp-nav a.tp-nav-cat:hover, .tp-nav button.tp-nav-cat:hover { background: #fff; }
.tp-nav .tp-nav-group.is-current > .tp-nav-cat { color: var(--mm-primary); }
.tp-nav .tp-nav-cat .mmm-ic { width: 28px; height: 28px; border-radius: 8px; }
.tp-nav .tp-chev { margin-left: auto; color: var(--mm-faint); transition: transform .15s ease; }
.tp-nav .tp-nav-group.is-open .tp-chev { transform: rotate(90deg); }
.tp-nav-list { display: none; padding: 2px 0 8px 14px; border-left: 2px solid var(--mm-line); margin-left: 23px; }
.tp-nav-group.is-open .tp-nav-list { display: block; }
.tp-nav-list a { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 9px; font-size: .82rem; font-weight: 600; color: var(--mm-text); text-decoration: none; }
.tp-nav-list a:hover { background: #fff; color: var(--mm-primary); }
.tp-nav-list a.is-current { background: #EEF2FF; color: var(--mm-primary); }
.tp-nav-list a svg { flex-shrink: 0; }
.tp-pro { margin-top: 16px; padding: 16px; border-radius: 16px; background: linear-gradient(160deg, #FFFBEB, #FEF3C7 70%); border: 1px solid #FDE68A; }
.tp-pro b { display: flex; align-items: center; gap: 8px; font-size: .92rem; }
.tp-pro p { font-size: .78rem; color: #92400E; margin: 6px 0 12px; line-height: 1.5; }
.tp-pro .mmh-cta { width: 100%; justify-content: center; padding: 9px 12px; font-size: .84rem; }

.tp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.tp-crumbs { font-size: .84rem; color: var(--mm-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tp-crumbs a { color: var(--mm-muted); text-decoration: none; }
.tp-crumbs a:hover { color: var(--mm-primary); }
.tp-crumbs b { color: var(--mm-ink); font-weight: 600; }
.tp-actions { display: flex; gap: 8px; }
.tp-act { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--mm-line); border-radius: 11px; padding: 7px 13px;
    font-size: .82rem; font-weight: 700; color: var(--mm-ink-2); cursor: pointer; font-family: inherit; }
.tp-act:hover { border-color: #C7D2FE; color: var(--mm-primary); }
.tp-act.is-on { color: #E11D48; border-color: #FECDD3; background: #FFF1F2; }
.tp-act.is-on svg { fill: #E11D48; }

.tp-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.tp-head-ic { width: 74px; height: 74px; border-radius: 20px; background: var(--mm-grad); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; box-shadow: 0 16px 30px -16px rgba(79, 70, 229, .85); }
.tp-head-ic svg path:first-child { fill: #fff; fill-opacity: .95; }
.tp-head h1 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin: 2px 0 6px; line-height: 1.15; }
.tp-head p { color: var(--mm-muted); margin: 0 0 12px; font-size: .98rem; line-height: 1.55; }
.tp-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.tp-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--mm-line); color: var(--mm-ink-2); }
.tp-badge i { font-style: normal; font-size: .85rem; }
.tp-badge.g { color: #166534; background: #F0FDF4; border-color: #BBF7D0; }
.tp-badge.b { color: #3730A3; background: #EEF2FF; border-color: #C7D2FE; }
.tp-badge.v { color: #6D28D9; background: #F5F3FF; border-color: #DDD6FE; }
.tp-badge.o { color: #9A3412; background: #FFF7ED; border-color: #FED7AA; }

.tp-work { background: #fff; border: 1px solid var(--mm-line); border-radius: 22px; box-shadow: var(--mm-shadow); padding: 22px; }
.tp-work > .card, .tp-work .tp-inner > .card { border: 0 !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; background: transparent !important; max-width: 100% !important; }
.tp-work form label { font-weight: 700; font-size: .88rem; color: var(--mm-ink-2); }
.tp-work form button[type=submit], .tp-work form .btn[type=submit] { width: 100%; padding: 15px 20px; font-size: 1rem; border-radius: 14px; margin-top: 14px; }
.tp-work form button[type=submit].btn-inline { width: auto; }
.tp-work .upload-dropzone { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

.tp-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.tp-feat { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--mm-line); border-radius: 18px; padding: 16px; }
.tp-feat-ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tp-feat b { display: block; font-size: .9rem; margin-bottom: 3px; }
.tp-feat span { font-size: .8rem; color: var(--mm-muted); line-height: 1.5; }

.tp-card { background: #fff; border: 1px solid var(--mm-line); border-radius: 20px; padding: 18px 20px; box-shadow: var(--mm-shadow); }
.tp-card h2 { display: flex; align-items: center; gap: 10px; font-size: 1.02rem; margin: 0 0 14px; }
.tp-card h2 .mmm-soft { width: 30px; height: 30px; }
.tp-steps { list-style: none; margin: 0; padding: 0; counter-reset: tps; }
.tp-steps li { counter-increment: tps; display: flex; gap: 12px; padding: 8px 0; font-size: .86rem; color: var(--mm-text); line-height: 1.5; }
.tp-steps li::before { content: counter(tps); width: 30px; height: 30px; border-radius: 10px; background: #EEF2FF; color: var(--mm-primary);
    font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tp-ai { background: linear-gradient(140deg, #1E1B4B 0%, #312E81 45%, #4C1D95 100%); color: #fff; border-radius: 20px; padding: 20px; position: relative; overflow: hidden; }
.tp-ai::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(167, 139, 250, .22); right: -60px; top: -60px; }
.tp-ai small { font-size: .74rem; font-weight: 700; color: #C7D2FE; letter-spacing: .04em; position: relative; }
.tp-ai h3 { color: #fff; font-size: 1.3rem; margin: 4px 0 8px; position: relative; }
.tp-ai h3 em { font-style: normal; font-size: .64rem; background: var(--mm-grad); border-radius: 999px; padding: 3px 8px; vertical-align: middle; margin-left: 4px; }
.tp-ai p { font-size: .83rem; color: #DDD6FE; margin: 0 0 14px; line-height: 1.55; position: relative; }
.tp-ai a { position: relative; display: inline-flex; align-items: center; gap: 8px; background: var(--mm-grad); color: #fff; font-weight: 700;
    font-size: .86rem; padding: 10px 16px; border-radius: 12px; text-decoration: none; }
.tp-rel a { display: flex; align-items: center; gap: 12px; padding: 9px 8px; border-radius: 12px; text-decoration: none; }
.tp-rel a:hover { background: var(--mm-soft); }
.tp-rel b { display: block; font-size: .86rem; color: var(--mm-ink); }
.tp-rel span { display: block; font-size: .75rem; color: var(--mm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 190px; }
.tp-rel svg.tp-go { margin-left: auto; color: var(--mm-faint); flex-shrink: 0; }
.tp-card-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tp-card-h h2 { margin: 0; }
.tp-card-h a { font-size: .8rem; font-weight: 700; text-decoration: none; }

.tp-below { margin-top: 26px; }
.tool-fullwidth-section { max-width: 100% !important; }
.tp-below .card, .tp-below .tool-fullwidth-section { border-radius: 20px; }
.tool-faq-item { background: #fff; border: 1px solid var(--mm-line); border-radius: 14px; padding: 4px 16px; margin-bottom: 8px; }
.tool-faq-item summary { cursor: pointer; font-weight: 700; padding: 10px 0; }

/* =====================================================================
   CATEGORY PAGE
   ===================================================================== */
.cat-hero { position: relative; overflow: hidden; border-radius: 24px; padding: 30px 30px; color: #fff; margin-bottom: 18px;
    display: flex; align-items: center; gap: 20px; box-shadow: 0 20px 44px -26px rgba(79, 70, 229, .8); }
.cat-hero::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .1); right: -70px; top: -90px; }
.cat-hero-ic { width: 64px; height: 64px; border-radius: 18px; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cat-hero h1 { color: #fff; margin: 0 0 6px; font-size: clamp(1.45rem, 3vw, 2rem); }
.cat-hero p { margin: 0; color: rgba(255, 255, 255, .88); font-size: .95rem; }
.cat-trust { display: flex; gap: 22px; flex-wrap: wrap; margin: 0 0 18px; }
.cat-trust span { display: inline-flex; align-items: center; gap: 7px; font-size: .84rem; font-weight: 700; color: var(--mm-ink-2); }
.cat-bar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.cat-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--mm-line); border-radius: 14px; padding: 4px 14px; }
.cat-search input { border: 0 !important; box-shadow: none !important; margin: 0 !important; padding: 10px 0 !important; flex: 1; background: transparent; }
.cat-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cat-chip { border: 1px solid var(--mm-line); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: .8rem; font-weight: 700; color: var(--mm-muted); cursor: pointer; font-family: inherit; }
.cat-chip.is-on { background: var(--mm-primary); border-color: var(--mm-primary); color: #fff; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.cat-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--mm-line); border-radius: 18px; padding: 18px; text-decoration: none; color: inherit;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; position: relative; }
.cat-card:hover { transform: translateY(-3px); border-color: #C7D2FE; box-shadow: var(--mm-shadow-lg); }
.cat-card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cat-card b { font-size: .95rem; color: var(--mm-ink); }
.cat-card p { font-size: .82rem; color: var(--mm-muted); line-height: 1.5; margin: 0 0 12px; flex: 1; }
.cat-card .cat-use { font-size: .8rem; font-weight: 800; color: var(--mm-primary); display: inline-flex; align-items: center; gap: 6px; }
.cat-free { position: absolute; top: 14px; right: 14px; font-size: .66rem; font-weight: 800; color: #166534; background: #DCFCE7; border-radius: 999px; padding: 2px 8px; }
.cat-empty { display: none; text-align: center; padding: 30px; color: var(--mm-muted); }
.cat-others { margin-top: 34px; }
.cat-others h2 { font-size: 1.2rem; margin-bottom: 12px; }
.cat-others-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.cat-other { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--mm-line); border-radius: 14px; padding: 12px; text-decoration: none; color: var(--mm-ink-2); font-weight: 700; font-size: .84rem; }
.cat-other:hover { border-color: #C7D2FE; color: var(--mm-primary); }

/* =====================================================================
   FOOTER
   ===================================================================== */
.mmf { background: #fff; border-top: 1px solid var(--mm-line); margin-top: 48px; }
.mmf-cols { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; padding: 36px 24px 26px; }
.mmf-about p { font-size: .86rem; color: var(--mm-muted); margin: 12px 0 14px; max-width: 300px; line-height: 1.6; }
.mmf h4 { font-family: var(--mm-font-head); font-size: .9rem; margin: 0 0 12px; color: var(--mm-ink); }
.mmf-cols a { display: block; font-size: .86rem; color: var(--mm-muted); text-decoration: none; padding: 4px 0; }
.mmf-cols a:hover { color: var(--mm-primary); }
.mmf-social { display: flex; gap: 8px; flex-wrap: wrap; }
.mmf-social a { width: 34px; height: 34px; border-radius: 10px; background: var(--mm-bg); display: inline-flex; align-items: center; justify-content: center; color: var(--mm-ink-2); padding: 0; }
.mmf-social a:hover { background: var(--mm-soft); color: var(--mm-primary); }
.mmf-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; padding: 14px 24px; border-top: 1px solid var(--mm-line-2); font-size: .8rem; font-weight: 600; color: var(--mm-muted); }
.mmf-trust span { display: inline-flex; align-items: center; gap: 7px; }
.mmf-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 24px 22px; border-top: 1px solid var(--mm-line-2); font-size: .82rem; color: var(--mm-muted); }
.mmf-bottom a { color: var(--mm-ink-2); font-weight: 700; text-decoration: none; }
.mmf-apps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 0 24px 18px; }
.mmf-app { display: inline-flex; align-items: center; gap: 10px; background: var(--mm-ink); color: #fff; border-radius: 12px; padding: 9px 16px; text-decoration: none; font-size: .84rem; font-weight: 700; }
.mmf-app:hover { color: #fff; opacity: .9; }
.mmf-app small { display: block; font-size: .62rem; font-weight: 600; color: #94A3B8; text-transform: uppercase; letter-spacing: .05em; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1360px) {
    .mmh-search { width: 230px; }
    .mmh-hide-lg { display: none !important; }
}
@media (max-width: 1279px) {
    .tp { grid-template-columns: minmax(0, 1fr) 320px; }
    .tp-left { display: none; }
    .mmm-inner { grid-template-columns: repeat(3, 1fr); }
    .mmm-promo { grid-column: 1 / -1; }
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .cat-others-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
    .mmh-nav .mmh-hide-md { display: none; }
    .mmh-search { width: 190px; }
    .mmh-user-txt { display: none; }
}
@media (max-width: 1023px) {
    :root { --mm-header-h: 60px; }
    .mmh-nav, .mmh-search, .mmh-desk { display: none !important; }
    .mmh-burger, .mmh-msearch { display: inline-flex; }
    .mmh-bar { gap: 8px; }
    .mmh-brand { margin: 0 auto; }
    .mmh-brand-txt small { font-size: .62rem; }
    .mmm, .mmm-scrim { display: none !important; }
    .tp { grid-template-columns: 1fr; }
    .tp-right { position: static; }
    .tp-feats { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .cat-others-grid { grid-template-columns: repeat(3, 1fr); }
    .mmf-cols { grid-template-columns: 1fr 1fr; }
    .mmf-about { grid-column: 1 / -1; }

    /* bottom navigation */
    body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
    .mmb { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
        background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); border-top: 1px solid var(--mm-line);
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
    .mmb a, .mmb button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 12px;
        font-size: .66rem; font-weight: 700; color: var(--mm-muted); text-decoration: none; background: none; border: 0; font-family: inherit; cursor: pointer; }
    .mmb .is-active { color: var(--mm-primary); background: #EEF2FF; }
    .whatsapp-fab { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
    .bookmark-toast { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
}
@media (max-width: 600px) {
    .mm-wrap { padding: 0 14px; }
    main.container { padding-left: 14px; padding-right: 14px; padding-top: 14px; }
    .mmh-brand-txt small { display: none; }
    .tp-head { gap: 12px; }
    .tp-head-ic { width: 56px; height: 56px; border-radius: 16px; }
    .tp-head-ic svg { width: 34px; height: 34px; }
    .tp-work { padding: 16px; border-radius: 18px; }
    .tp-actions .tp-act span { display: none; }
    .cat-hero { padding: 22px 18px; border-radius: 20px; }
    .cat-hero-ic { width: 52px; height: 52px; }
    .cat-grid { grid-template-columns: 1fr; gap: 10px; }
    .cat-card { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
    .cat-card-top { margin: 0; }
    .cat-card p { display: none; }
    .cat-card .cat-sub { display: block !important; }
    .cat-card .cat-use { margin-left: auto; }
    .cat-free { display: none; }
    .cat-others-grid { grid-template-columns: repeat(2, 1fr); }
    .mmf-cols { grid-template-columns: 1fr 1fr; gap: 18px; padding: 26px 16px 18px; }
    .mmf-bottom { justify-content: center; text-align: center; }
}

/* RTL basics */
html[dir="rtl"] .mmh-nav { margin-left: 0; margin-right: 8px; }
html[dir="rtl"] .mmh-panel { right: auto; left: 0; }
html[dir="rtl"] .tp-nav-list { border-left: 0; border-right: 2px solid var(--mm-line); margin-left: 0; margin-right: 23px; padding-left: 0; padding-right: 14px; }
html[dir="rtl"] .mmm-cat em, html[dir="rtl"] .mms-row em, html[dir="rtl"] .tp-rel svg.tp-go { margin-left: 0; margin-right: auto; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
    .mmh, .mmb, .mmf, .tp-left, .tp-right, .mmm { display: none !important; }
}
