.am-site{direction:rtl;font-family:Tahoma,Arial,sans-serif;color:#173c2e;line-height:1.95}.am-shell{max-width:1160px;margin:auto;padding:0 20px}.am-top{background:#103d2d;color:#fff;font-size:13px;padding:7px 0}.am-brand{background:#faf7ed;padding:20px 0;text-align:center}.am-brand h1{font-size:clamp(22px,4vw,36px);color:#143e2d;margin:0}.am-brand p{margin:4px 0}.am-nav{background:#174d37;color:white}.am-nav ul{display:flex;flex-wrap:wrap;justify-content:center;gap:0;list-style:none;margin:0;padding:0}.am-nav a{display:block;color:white;padding:12px 10px;text-decoration:none;font-size:14px}.am-nav a:hover,.am-nav a:focus{background:#30684e}.am-nav summary{display:none}.am-hero{background:#f5f1e6;padding:40px 0}.am-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.am-card{border:1px solid #deded2;border-radius:8px;padding:20px;background:white;color:#173c2e}.am-card h2,.am-card h3{margin-top:0;color:#174d37}.am-section{padding:28px 0}.am-btn{display:inline-block;background:#17543a;color:white!important;padding:9px 17px;border-radius:5px;text-decoration:none}.am-placeholder{border:1px dashed #9eab9d;padding:28px;text-align:center;background:#faf9f3;color:#526357}.am-footer{background:#103d2d;color:#fff;padding:32px 0}.am-footer a{color:#fff}.am-footer h2,.am-footer h3{color:#eed8a2}.am-site a:focus-visible{outline:3px solid #b88b35;outline-offset:3px}.am-search input{max-width:100%;padding:8px}.am-site .custom-logo{max-width:85px;height:auto}@media(max-width:700px){.am-nav summary{display:block;padding:10px 20px;cursor:pointer}.am-nav details:not([open]) ul{display:none}.am-nav ul{display:grid;grid-template-columns:1fr 1fr}.am-grid{grid-template-columns:1fr}.am-shell{padding:0 14px}.am-hero{padding:20px 0}}@media(min-width:701px){.am-nav details:not([open])>ul{display:flex}}
.am-brand .am-brand-title{margin:0;font-size:clamp(1.4rem,4vw,2.25rem);line-height:1.5;font-weight:700;color:#143e2d}.am-brand .custom-logo{width:76px;max-width:100%;height:auto}.am-grid>*,.am-nav li{min-width:0;overflow-wrap:anywhere}.am-draft-content{direction:rtl;overflow-wrap:anywhere}.am-draft-content :is(input:not([type=checkbox]),select,textarea){max-width:100%;box-sizing:border-box}.am-draft-content textarea{width:min(100%,42rem)}.am-draft-content img{max-width:100%;height:auto}.am-draft-content .entry-content :is(h2,h3){color:#174d37}.am-nav a[aria-current=page]{text-decoration:underline}

/* Ashraf-ul-Madaris: typography and layout for the private Kadence draft. */
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) {
  --am-paper: #fff;
  --am-wash: #f4f7f4;
  --am-ink: #253b31;
  --am-green: #174a36;
  --am-deep-green: #143b30;
  --am-muted: #506356;
  --am-line: #dce6df;
  --am-gold: #a68342;
  --am-urdu: 'Noto Naskh Arabic', 'Noto Naskh Arabic UI', 'Geeza Pro', Tahoma, Arial, sans-serif;
  background: var(--am-paper);
  color: var(--am-ink);
}
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) .am-site {
  font-family: var(--am-urdu);
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--am-ink);
}
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) .am-site :is(h1,h2,h3) {
  font-family: inherit;
  color: var(--am-deep-green);
  line-height: 1.48;
  text-wrap: balance;
}
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) .am-site :is(input,select,textarea,button) { font-family: inherit; }
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) .am-site a:focus-visible,
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) .am-nav summary:focus-visible {
  outline: 2px solid var(--am-gold);
  outline-offset: 4px;
}
.am-site .am-shell { max-width: 1180px; width: min(calc(100% - 48px), 1180px); margin-inline: auto; }
.am-site .am-top { background: var(--am-deep-green); color: #fff; font-size: .85rem; line-height: 1.6; padding-block: .55rem; }
.am-site .am-brand { background: var(--am-paper); padding-block: 1.05rem; border-bottom: 1px solid var(--am-line); }
.am-site .am-brand .am-shell {
  display: grid;
  grid-template-columns: 64px minmax(0,1fr);
  gap: 0 1rem;
  align-items: center;
  text-align: start;
}
.am-site .am-brand img.custom-logo { grid-row: 1 / 4; width: 64px; height: auto; align-self: center; }
.am-site .am-brand p { grid-column: 2; margin: 0; }
.am-site .am-brand p:not(.am-brand-title) { color: var(--am-muted); font-size: .9rem; line-height: 1.65; }
.am-site .am-brand .am-brand-title { color: var(--am-deep-green); font-size: clamp(1.45rem, 2.25vw, 2.15rem); line-height: 1.4; }
.am-site .am-nav { background: var(--am-paper); color: var(--am-green); border-bottom: 1px solid var(--am-line); }
.am-site .am-nav :is(a,summary) { color: var(--am-green); font-size: 1rem; }
.am-site .am-nav a { padding: .6rem .78rem; font-weight: 600; }
.am-site .am-nav a:hover, .am-site .am-nav a[aria-current='page'] { background: var(--am-wash); color: var(--am-deep-green); }
.am-site .am-nav a[aria-current='page'] { box-shadow: inset 0 -2px var(--am-gold); }
.am-site .am-nav summary { min-height: 44px; padding-block: .5rem; }
@supports selector(details::details-content) {
  @media (min-width: 980px) {
    .am-site .am-nav details::details-content { content-visibility: visible; block-size: auto; overflow: visible; }
    .am-site .am-nav details > summary { display: none; }
    .am-site .am-nav details > ul { display: flex; flex-wrap: wrap; margin: 0; gap: 0 .14rem; }
  }
}
.am-site .am-hero { background: var(--am-wash); padding-block: clamp(1.45rem,3.2vw,3rem); border-bottom: 1px solid var(--am-line); }
.am-site .am-hero > .am-grid { align-items: center; gap: 1.5rem 2.5rem; }
.am-site .am-hero > .am-grid > div:first-child { border-inline-start: 3px solid var(--am-gold); padding-inline-start: clamp(.75rem,2.2vw,1.6rem); }
.am-site .am-hero > .am-grid:has(.am-placeholder) { grid-template-columns: minmax(0,1fr); gap: .75rem; }
.am-site .am-hero h1 { font-size: clamp(1.7rem,3.05vw,2.65rem); margin: 0 0 .6rem; }
.am-site .am-hero p { margin: 0 0 1rem; max-width: 56ch; }
.am-site .am-hero .am-placeholder { max-width: none; margin: 0; border: 0; background: transparent; color: var(--am-muted); padding: 0; font-size: .86rem; text-align: start; }
.am-site .am-hero img { display: block; width: 100%; max-height: 370px; object-fit: cover; border-radius: 6px; }
.am-site .am-btn, .am-site .am-search button { background: var(--am-green); color: white; border: 1px solid var(--am-green); border-radius: 6px; }
.am-site .am-btn:hover, .am-site .am-search button:hover { background: var(--am-deep-green); color: white; }
.am-site .am-section { padding-block: clamp(1.25rem,2.7vw,2.15rem); }
.am-site .am-section + .am-section { border-top: 1px solid var(--am-line); }
.am-site .am-section h2 { margin-block: 0 .75rem; }
.am-site .am-card { padding: 1rem; background: var(--am-paper); border: 1px solid var(--am-line); border-radius: 8px; box-shadow: none; }
.am-site a.am-card { display: flex; justify-content: space-between; align-items: center; gap: .65rem; min-height: 58px; font-weight: 700; text-decoration: none; }
.am-site a.am-card::after { content: '←'; color: var(--am-gold); font-family: Arial,sans-serif; }
.am-site a.am-card:hover { border-color: var(--am-green); background: var(--am-wash); }
.am-site article.am-card h2 { font-size: clamp(1.12rem,1.7vw,1.45rem); }
.am-site article.am-card p { margin-block: .35rem .65rem; }
.am-site .am-section > .am-grid:has(> article.am-card) { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.am-site .am-section > .am-grid:has(> div.am-card:only-child) > div.am-card { background: var(--am-wash); }
.am-site .am-section > .am-grid:has(> div.am-card:only-child) > div.am-card p { margin-bottom: .3rem; }
.am-site .am-search { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; }
.am-site .am-search label { font-weight: 600; }
.am-site .am-search :is(input,select):not([type='hidden']) { min-width: 0; min-height: 44px; border-color: var(--am-line); border-radius: 6px; }
.am-site .am-search button { min-height: 44px; }
.am-site.am-footer { background: var(--am-wash); color: var(--am-ink); border-top: 1px solid var(--am-line); padding-block: 1.8rem; }
.am-site.am-footer .am-grid { grid-template-columns: 1fr 1.45fr 1fr 1fr; gap: 1.15rem; }
.am-site.am-footer a:not(.am-btn) { color: var(--am-green); }
.am-site.am-footer :is(h2,h3) { margin-block: 0 .55rem; font-size: 1.18rem; }
.am-site.am-footer :is(p,li) { font-size: 1rem; line-height: 1.75; }
.am-site.am-footer p { margin-block: 0 .55rem; }
.am-site.am-footer ul { padding: 0; margin: 0; list-style: none; }
.am-site.am-footer li { break-inside: avoid; margin-block: .18rem; }
.am-site.am-footer section:nth-child(2) ul { columns: 2; column-gap: .85rem; }
@media (max-width: 900px) {
  .am-site.am-footer .am-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .am-site .am-shell { width: calc(100% - 28px); }
  .am-site .am-top { font-size: .76rem; }
  .am-site .am-brand { padding-block: .72rem; }
  .am-site .am-brand .am-shell { grid-template-columns: 47px minmax(0,1fr); gap: 0 .6rem; }
  .am-site .am-brand img.custom-logo { width: 47px; }
  .am-site .am-brand .am-brand-title { font-size: 1.22rem; }
  .am-site .am-brand p:not(.am-brand-title) { font-size: .78rem; }
  .am-site .am-hero > .am-grid { grid-template-columns: minmax(0,1fr); }
  .am-site .am-hero .am-placeholder { font-size: .8rem; }
  .am-site .am-section > .am-grid:has(> a.am-card) { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
  .am-site .am-section > .am-grid:has(> article.am-card) { grid-template-columns: minmax(0,1fr); gap: .7rem; }
  .am-site a.am-card { padding: .5rem .65rem; font-size: .95rem; line-height: 1.55; }
  .am-site .am-search label { flex-basis: 100%; }
  .am-site .am-search input[type='search'] { flex: 1; }
  .am-site.am-footer .am-grid { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  .am-site.am-footer section + section { border-top: 1px solid var(--am-line); padding-block-start: .85rem; }
}

@media (min-width: 980px) {
  .am-site .am-nav details > ul { justify-content: center; }
  .am-site .am-nav a { padding-inline: .52rem; font-size: .97rem; }
}
@media (min-width: 980px) and (max-width: 1199px) {
  .am-site .am-nav details > ul { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); text-align: center; }
}
.am-site .am-hero > .am-grid:has(.am-placeholder) { max-width: 810px; }

/* Keep the same reading rhythm on the existing interior templates. */
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) :is(.entry-title,.entry-content) { font-family: var(--am-urdu); }
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) .entry-content { font-size: 1.125rem; line-height: 1.85; }
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) :is(.entry-title,.entry-content :is(h2,h3)) { color: var(--am-deep-green); line-height: 1.48; }
body:is(.wp-theme-ashraf-ul-madaris, .wp-theme-kadence) .entry-content :is(input,textarea,select,button) { font-family: inherit; }
.am-site .am-nav summary::before { content: '☰'; margin-inline-end: .55rem; font-family: Arial,sans-serif; font-size: .9em; }

/* Compact mobile header and founder card. */
.am-site .am-date-mobile { display: none; }

@media (max-width: 700px) {
  .am-site .am-top { padding: 0; font-size: 12.5px; line-height: 1.5; }
  .am-site .am-top .am-shell { width: 100%; padding-inline: 10px; }
  .am-site .am-date-desktop, .am-site .am-brand-founder { display: none; }
  .am-site .am-date-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    gap: .6rem;
    white-space: nowrap;
  }
  .am-site .am-date-hijri {
    padding-inline-start: .6rem;
    border-inline-start: 1px solid rgba(255, 255, 255, .45);
  }
  .am-site .am-brand { padding-block: .55rem; }
  .am-site .am-brand .am-shell {
    width: 100%;
    padding-inline: 14px;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: .65rem;
  }
  .am-site .am-brand img.custom-logo { width: 44px; }
  .am-site .am-brand .am-brand-title {
    font-size: clamp(17px, 4.55vw, 20px);
    line-height: 1.38;
  }
  .am-site .am-brand p:is(.am-brand-kicker, .am-brand-history) {
    font-size: 12px;
    line-height: 1.35;
  }
  .am-site .am-nav .am-shell { width: 100%; padding-inline: 14px; }
  .am-site .am-nav summary {
    display: flex;
    box-sizing: border-box;
    align-items: center;
    min-height: 46px;
    gap: .5rem;
    margin: 0;
    padding: 0;
    font-size: 15px;
    line-height: 1.4;
  }
  .am-site .am-nav summary::before { margin-inline-end: 0; }
  .am-site article.am-founder-card {
    border-inline-start: 3px solid var(--am-gold);
    background: var(--am-wash);
  }
  /* Reflow the preview-only notice and actions into two rows on phones. */
  body #wpvibe-preview-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content max-content;
    grid-template-areas: "badge stop live" "notice notice notice";
    gap: 4px 6px;
    direction: ltr;
    text-align: left;
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
    line-height: 1.35;
  }
  body #wpvibe-preview-banner .wpvibe-badge { grid-area: badge; gap: 5px; font-size: 11px; }
  body #wpvibe-preview-banner .wpvibe-info { grid-area: notice; color: #e2e8f0; font-size: 11px; }
  body #wpvibe-preview-banner .wpvibe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 3px 6px;
    font-size: 11px;
    white-space: nowrap;
  }
  body #wpvibe-preview-banner .wpvibe-btn-stop { grid-area: stop; }
  body #wpvibe-preview-banner .wpvibe-btn-live { grid-area: live; color: #e2e8f0; }
  body.wpvibe-preview-active { padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important; }
}
