/* The tutors page (2026-11-15): the public page /tutors and the student dashboard's "Find a tutor" share these, with the
   site's own tokens from app.css. Every class starts with mk- so nothing here touches the existing pages.
   Revised 2026-11-16 (Ahmed: "make sure everything is compact"): shorter cards, a phone card of about 300 px, the days in
   a grid with none cut off, two-column answers on phones. */
.mk { display: grid; gap: 16px; min-width: 0; }
.mk .ico, .mk-dlg .ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:root[dir="rtl"] .mk .flip { transform: scaleX(-1); }
:root[dir="ltr"] .mk .flip-back { transform: scaleX(-1); }
.mk .card { padding: 22px; }
.mk h1 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
.mk-h2 { font-size: 1.15rem; margin-top: 4px; }
.mk-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 2px; color: var(--forest); font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; min-height: 40px; }
.mk-label { margin: 14px 0 8px; color: var(--muted); font-size: 13.5px; font-weight: 700; }
.mk .w-sm { display: none; }

/* the questions */
.mk-ask { width: min(620px, 100%); margin: 4px auto 0; border-top: 3px solid var(--mint); }
.mk-ask h2 { font-size: clamp(1.4rem, 3vw, 1.75rem); margin-top: 4px; }
.mk-ask .lead { margin-top: 4px; }
.mk-ask-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; }
.mk-progress { display: inline-flex; gap: 6px; }
.mk-progress i { width: 28px; height: 5px; border-radius: 99px; background: var(--line); }
.mk-progress i.on { background: var(--forest); }
.mk-step { color: var(--muted); font-size: 13px; font-weight: 700; }
.mk-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.mk-opts button { min-height: 52px; padding: 10px 14px; border: 1px solid var(--field-border); border-radius: 14px; background: #fff; color: var(--teal); font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; text-align: start; transition: border-color .15s ease, background .15s ease; }
.mk-opts button:hover { border-color: var(--forest); background: var(--ivory); }
.mk-opts button[aria-pressed="true"] { background: var(--mint); border-color: var(--forest); color: var(--forest); }
.mk-ask-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--line); }
.mk-search { position: relative; display: block; margin-top: 14px; }
.mk-search .ico { position: absolute; inset-inline-start: 14px; top: 50%; margin-top: -9px; color: var(--muted); }
.mk-search input { padding-inline-start: 42px; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--field-border); border-radius: 999px; background: #fff; color: var(--teal); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; text-align: start; }
.mk-chips button:hover { border-color: var(--forest); }
.mk-chips button[aria-pressed="true"] { background: var(--mint); border-color: var(--forest); color: var(--forest); }
.mk-chips button small { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--sage); color: var(--forest); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.mk-chips.quiet button { border-color: var(--line); color: var(--muted); }
.mk-more { margin-top: 4px; }

/* the list */
.mk-head .lead { max-width: 64ch; margin-top: 4px; font-size: 15.5px; }
.mk-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.mk-answers { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.mk-answers button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; cursor: pointer; color: var(--teal); }
.mk-answers button:hover { border-color: var(--forest); }
.mk-answers small { color: var(--muted); font-size: 12.5px; }
.mk-answers b { font-size: 14px; }
.mk-answers .ico { width: 15px; height: 15px; color: var(--muted); }
.mk-bar { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; min-width: 0; }
.mk-bar > span { flex: none; }
.mk-bar .chips { flex-wrap: nowrap; }
.mk-bar .chips button { white-space: nowrap; }
/* the two refunds (2026-11-17): at the top of the list and above the pay button, where they help a student decide */
.mk-promise { display:grid; grid-template-columns:minmax(0, 1.4fr) minmax(0, 1fr); gap:16px; align-items:center; padding:14px 16px; border:1px solid #c5dfd0; border-radius:14px; background:#edf5f0; }
.mk-trial { display:flex; align-items:center; gap:12px; min-width:0; }
.mk-refund-amount { flex:none; display:grid; place-items:center; width:62px; height:62px; border-radius:14px; background:var(--forest); color:#fff; font-family:var(--sans-en); font-size:23px; font-weight:700; letter-spacing:-1px; }
.mk-promise b { display:block; font-size:14px; line-height:1.5; color:var(--forest); }
.mk-promise p { margin:2px 0; font-size:13px; line-height:1.6; color:var(--teal); }
.mk-promise small { display:block; font-size:12px; line-height:1.6; color:var(--muted); }
.mk-promise .mk-refund-deadline { color:var(--forest); font-weight:700; }
.mk-promise a { color:var(--forest); font-weight:700; text-underline-offset:3px; }
.mk-cancel { display:flex; align-items:center; gap:10px; border-inline-start:1px solid #c5dfd0; padding-inline-start:18px; }
.mk-cancel > .ico { width:20px; height:20px; color:var(--forest); }
.mk-promise.in-panel { grid-template-columns:minmax(0,1fr); padding:12px; gap:10px; }
.mk-promise.in-panel .mk-refund-amount { width:52px; height:52px; font-size:21px; border-radius:12px; }
.mk-promise.in-panel .mk-trial { align-items:flex-start; gap:10px; }
.mk-promise.in-panel .mk-cancel { border-inline-start:0; border-top:1px solid #c5dfd0; padding:10px 0 0; }
.mk-list { display: grid; gap: 12px; }
.mk-card { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) 200px; column-gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; }
.mk-card:hover { border-color: #94bca4; box-shadow: 0 3px 12px #073f3908; }
.mk-card-hit { position: absolute; inset: 0; z-index: 0; border: 0; border-radius: 14px; background: none; cursor: pointer; }
.mk-card-hit:focus-visible { outline-offset: -3px; }
.mk-card .btn, .mk-card a { position: relative; z-index: 1; }
.mk-card .mk-ph { width: 84px; height: 84px; border-radius: 20px; font-size: 26px; }
.mk-card-main { min-width: 0; display: grid; gap: 4px; align-content: start; pointer-events: none; }
.mk-card-name { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
.mk-card h3 { font-size: 1.2rem; line-height: 1.35; min-width: 0; }
.mk-card-side { display: grid; gap: 10px; align-content: center; pointer-events: none; padding-inline-start:18px; border-inline-start:1px solid var(--line); }
.mk-card-side .btn { pointer-events: auto; }
.mk-title { color: var(--teal); font-weight: 700; font-size: 14.5px; }
.mk-card .mk-title { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.5; }
.mk-sub { color: var(--muted); font-size: 14px; font-weight: 400; }
.mk-about { color: var(--text); font-size: 14.5px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-quals { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.mk-quals span { padding: 1px 10px; border-radius: 999px; background: #fdf6e6; border: 1px solid #ecd9ae; color: #7a5310; font-size: 12.5px; font-weight: 700; line-height: 1.7; }
.mk-teaches { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 2px; color: var(--muted); font-size: 13px; }
.mk-tag { padding: 1px 10px; border-radius: 999px; background: var(--sage); color: var(--forest); font-size: 12.5px; font-weight: 700; line-height: 1.7; }
.mk-tag.on { background: var(--forest); color: #fff; }
/* "+N", the subjects a card leaves out (its own class: "more" is a link style in the dashboard's stylesheet) */
.mk-rest { background: transparent; border: 1px solid var(--line); color: var(--muted); padding-inline: 8px; }
/* on a card the chips stay on one line: the script takes off the ones that don't fit (fitRows in tutors.js) and counts
   them in "+N"; a single chip too long for the line is cut with dots */
.mk-card .mk-fit { flex-wrap: nowrap; overflow: hidden; }
.mk-card .mk-fit > * { flex: 0 0 auto; white-space: nowrap; }
.mk-card .mk-fit > [hidden] { display: none; }
.mk-card .mk-fit.one > .mk-fit-i { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mk-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.mk-price b { font-family: var(--serif-en); font-weight: 400; font-size: 1.7rem; line-height: 1.1; color: var(--forest); }
:root[lang="ar"] .mk-price b { font-family: var(--sans); font-weight: 700; font-size: 1.45rem; }
.mk-price small { color: var(--muted); font-size: 13.5px; }
.mk-price.big b { font-size: 2rem; }
:root[lang="ar"] .mk-price.big b { font-size: 1.7rem; }
.mk-next { display: flex; gap: 6px; align-items: flex-start; color: var(--teal); font-size: 13.5px; font-weight: 600; line-height: 1.6; }
.mk-next .ico { margin-top: 3px; color: var(--forest); width: 16px; height: 16px; }
.mk-fac { display: inline-block; max-width: 100%; padding: 1px 9px; border: 1px solid #dcbf85; border-radius: 999px; background: #fdf6e6; color: #7a5310; font-size: 12px; font-weight: 700; line-height: 1.7; justify-self: start; }
.mk-empty { display: flex; gap: 14px; align-items: flex-start; background: var(--ivory); }
.mk-empty > .ico { width: 26px; height: 26px; color: var(--forest); margin-top: 2px; }
.mk-empty div { display: grid; gap: 10px; justify-items: start; }
.mk-help { color: var(--muted); font-size: 14px; text-align: center; }

/* Founding Faculty tutors on the tutors page (2026-11-17, Ahmed: "keep a separate design for doctors having faculty titles"):
   forest and gold, like their dashboard, on the card in the list and the top of their page */
.mk-card.fac, .mk-t-head.fac { background: linear-gradient(135deg, #073f39 0%, #0c4d45 100%); border-color: #c9a457; color: #eef3ef; box-shadow: 0 4px 18px #073f3926; }
.mk-card.fac:hover { border-color: #e2c27a; box-shadow: 0 6px 20px #073f3933; }
.mk-card.fac h3, .mk-t-head.fac h1 { color: #fff; }
.mk-card.fac .mk-title, .mk-t-head.fac .mk-title { color: #ecdcae; }
.mk-card.fac .mk-sub, .mk-card.fac .mk-teaches, .mk-card.fac .mk-price small { color: #c7d8cf; }
.mk-card.fac .mk-about { color: #e4ede8; }
.mk-card.fac .mk-tag { background: #ffffff1c; color: #fff; }
.mk-card.fac .mk-tag.on { background: #d6a24a; color: #073f39; }
.mk-card.fac .mk-quals span, .mk-t-head.fac .mk-quals span { background: #d6a24a24; border-color: #d6a24a8c; color: #f3d996; }
.mk-card.fac .mk-fac, .mk-t-head.fac .mk-fac { padding: 0; border: 0; background: none; color: #e2c27a; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
:root[lang="ar"] .mk-card.fac .mk-fac, :root[lang="ar"] .mk-t-head.fac .mk-fac { letter-spacing: 0; font-size: 13px; }
.mk-card.fac .mk-ph, .mk-t-head.fac .mk-ph { background: #0f5a51; color: #f3d996; box-shadow: 0 0 0 3px #d6a24a; }
.mk-card.fac .mk-card-side { border-color: #ffffff29; }
.mk-card.fac .mk-price b { color: #f3d996; }
.mk-card.fac .mk-next { color: #dfe9e4; }
.mk-card.fac .mk-next .ico { color: #e2c27a; }
.mk-card.fac .btn-primary { background: #d6a24a; border-color: #d6a24a; color: #073f39; }
.mk-card.fac .btn-primary:hover { background: #e2b25c; border-color: #e2b25c; }
.mk-t-head.fac .mk-badge { color: #9fdcb8; }

/* the preview in the tutor's profile and the admin's window: the page's own card and top, nothing pressable */
.mk-preview { display: grid; gap: 8px; container-type: inline-size; }
.mk-pv-l { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.mk-pv-box { display: grid; gap: 10px; }
.mk-pv-box > .mk-t-head, .mk-pv-box > .mk-t-info { grid-area: auto; }   /* the page's top and details stack here (their grid areas belong to the tutor page) */
.mk-pv-box .mk-card-hit { cursor: default; }
.mk-pv-more summary { cursor: pointer; color: var(--forest); font-weight: 700; font-size: 14px; padding: 4px 0; }
.mk-pv-more[open] summary { margin-bottom: 8px; }
.mk-preview .mk-t-head h1 { font-size: 1.35rem; }
/* the preview is narrower than the page: the phone's card and top from 640 px of its own width */
@container (max-width: 640px) {
  .mk-preview .mk-card { grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; row-gap: 5px; padding: 14px; }
  .mk-preview .mk-card .mk-ph { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; grid-row: 1 / span 2; align-self: center; }
  .mk-preview .mk-card-main { display: contents; }
  .mk-preview .mk-card-name { grid-column: 2; align-self: end; }
  .mk-preview .mk-card .mk-title { grid-column: 2; align-self: start; }
  .mk-preview .mk-card .mk-quals, .mk-preview .mk-card .mk-about, .mk-preview .mk-card .mk-teaches { grid-column: 1 / -1; }
  .mk-preview .mk-card h3 { font-size: 1.08rem; }
  .mk-preview .mk-card-side { border-inline-start: 0; padding-inline-start: 0; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
  .mk-preview .mk-card.fac .mk-card-side { border-top-color: #ffffff29; }
  .mk-preview .mk-card-side .mk-price { grid-column: 1; grid-row: 1; }
  .mk-preview .mk-card-side .mk-next { grid-column: 1; grid-row: 2; font-size: 13px; }
  .mk-preview .mk-card-side .btn { grid-column: 2; grid-row: 1 / span 2; }
  .mk-preview .mk-card .mk-price b { font-size: 1.4rem; }
  .mk-preview .mk-card .mk-sub { display: none; }
  .mk-preview .w-lg { display: none; }
  .mk-preview .w-sm { display: inline; }
  .mk-preview .mk-t-head { gap: 12px; }
  .mk-preview .mk-ph.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 24px; }
}
.mk-help a { font-weight: 700; }

/* photos */
.mk-ph { width: 96px; height: 96px; border-radius: 22px; overflow: hidden; background: var(--sage); color: var(--forest); display: grid; place-items: center; font-weight: 700; font-size: 28px; flex: none; }
.mk-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-ph.lg { width: 112px; height: 112px; border-radius: 26px; font-size: 34px; }
.mk-ph.sm { width: 48px; height: 48px; border-radius: 14px; font-size: 16px; }

/* a tutor's page */
.mk-back { justify-self: start; text-decoration: none; min-height: 36px; padding-block: 4px; }
.mk-tutor { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto 1fr; grid-template-areas: "head book" "info book"; gap: 16px 20px; align-items: start; }
/* a tutor with an introduction video (2026-11-18): the video under their name */
.mk-tutor.has-video { grid-template-rows: auto auto 1fr; grid-template-areas: "head book" "video book" "info book"; }
.mk-t-video, .mk .mk-t-video { grid-area: video; padding: 0; overflow: hidden; }
.mk-video { position: relative; aspect-ratio: 16 / 9; background: #0b302f; border-radius: 12px; overflow: hidden; }
.mk-t-video .mk-video { border-radius: inherit; }
.mk-t-info .mk-video { margin-bottom: 6px; }
.mk-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.mk-video-still { display: grid; place-items: center; align-content: center; gap: 6px; color: #e2c27a; font-size: 13px; font-weight: 700; }
.mk-video-still .ico { width: 34px; height: 34px; }
.mk-t-head { grid-area: head; display: flex; gap: 18px; align-items: center; }
.mk-t-head > div { display: grid; gap: 4px; min-width: 0; }
.mk-t-head h1 { font-size: clamp(1.45rem, 3vw, 2rem); }
.mk-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-size: 13px; font-weight: 700; }
.mk-badge .ico { width: 16px; height: 16px; }
.mk-t-info { grid-area: info; display: grid; gap: 8px; }
.mk-t-info h2 { font-size: 1.1rem; margin-top: 8px; }
.mk-t-info h2:first-child { margin-top: 0; }
.mk-t-info p { line-height: 1.8; }
.mk-t-info blockquote { margin: 2px 0 0; padding: 10px 14px; border-inline-start: 3px solid var(--accent); background: var(--ivory); border-radius: 10px; color: var(--teal); font-style: italic; }
.mk-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mk-facts li { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-size: 14.5px; }
.mk-facts .ico { margin-top: 3px; color: var(--forest); }
/* not sticky (2026-11-17): with the refunds above the pay button the panel can be taller than the window, and a sticky panel
   that tall would keep its own button out of reach */
.mk-book { grid-area: book; display: grid; gap: 10px; border-top: 3px solid var(--mint); scroll-margin-top: 84px; }
.mk-book-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.mk-book h2 { font-size: 1.2rem; }
.mk-book .mk-label { margin: 2px 0 0; }
/* every bookable day shows: four to a row, a week takes two rows, none hides behind a sideways scroll */
.mk-days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mk-days button { position: relative; min-width: 0; min-height: 52px; display: grid; gap: 0; justify-items: center; align-content: center; border: 1px solid var(--line); background: #fff; color: var(--teal); border-radius: 12px; padding: 4px 4px; font: inherit; cursor: pointer; }
.mk-days button small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.mk-days button b { font-size: 13.5px; line-height: 1.5; white-space: nowrap; }
.mk-days button:hover, .mk-times button:hover { border-color: var(--forest); }
.mk-days button[aria-pressed="true"], .mk-times button[aria-pressed="true"] { background: var(--mint); color: var(--forest); border-color: var(--forest); }
.mk-days button[aria-pressed="true"] small { color: var(--forest); }
.mk-n { position: absolute; top: -6px; inset-inline-end: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--forest); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; line-height: 20px; text-align: center; }
.mk-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.mk-times button { min-height: 44px; border: 1px solid var(--line); background: #fff; color: var(--teal); border-radius: 11px; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.mk-note { color: var(--muted); font-size: 12.5px; }
.mk-chosen { padding: 8px 12px; border-radius: 12px; background: var(--ivory); color: var(--teal); font-size: 14px; }
.mk-chosen ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mk-chosen li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; border-top: 1px solid var(--line); font-size: 14px; }
.mk-chosen li:first-child { border-top: 0; }
.mk-x { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.mk-x:hover { background: var(--sage); color: var(--teal); }
.mk-x .ico { width: 15px; height: 15px; }
.mk-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 0 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.mk-total b { color: var(--teal); font-size: 17px; }
.mk-form { display: grid; gap: 10px; }
.mk-form .field { margin: 0; }
.mk-form .field input[type="text"] { margin-top: 8px; }
.mk-form textarea { min-height: 60px; }
.mk-add { justify-self: start; min-height: 36px; padding-block: 4px; font-size: 14px; }
.mk-terms { font-size: 13.5px; }
.mk-small { color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* the student's home page: a few tutors */
.mk-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.mk-mini li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.mk-mini b { display: block; color: var(--teal); font-size: 14.5px; }
.mk-mini small { display: block; color: var(--muted); font-size: 13px; line-height: 1.5; }
.mk-mini .mk-mini-meta { display: flex; flex-wrap: wrap; gap: 0 12px; }
.mk-mini-meta span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.mk-mini-meta .ico { width: 13px; height: 13px; }

/* sign up to book */
.mk-dlg { width: min(420px, calc(100% - 24px)); border-radius: 22px; }
.mk-dlg-body { position: relative; display: grid; gap: 10px; justify-items: center; text-align: center; padding: 26px 22px 20px; }
.mk-dlg-body .mk-ph.lg { width: 88px; height: 88px; border-radius: 22px; }
.mk-dlg-body h2 { font-size: 1.35rem; }
.mk-dlg-body .switch { width: 100%; margin-top: 4px; }
.mk-dlg-close { position: absolute; top: 8px; inset-inline-end: 8px; }

@media (max-width: 1100px) {
  .mk-tutor { grid-template-columns: minmax(0, 1fr) 340px; }
  .mk-card { grid-template-columns: 72px minmax(0, 1fr) 184px; }
  .mk-card .mk-ph { width: 72px; height: 72px; border-radius: 18px; font-size: 22px; }
}
@media (max-width: 900px) {
  .mk-tutor { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "book" "info"; }
  .mk-tutor.has-video { grid-template-rows: none; grid-template-areas: "head" "video" "book" "info"; }
}
/* inside the dashboard the sidebar takes 252 px of the window: the one-column layout comes that much sooner */
@media (max-width: 1152px) {
  .mk-dash .mk-tutor { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "book" "info"; }
  .mk-dash .mk-tutor.has-video { grid-template-rows: none; grid-template-areas: "head" "video" "book" "info"; }
}
/* a phone's card: the photo beside the name, the rest across the card, the price and the button on one row */
@media (max-width: 700px) {
  .mk .w-lg { display: none; }
  .mk .w-sm { display: inline; }
  .mk-card { grid-template-columns: 56px minmax(0, 1fr); column-gap: 12px; row-gap: 5px; padding: 14px; }
  .mk-card .mk-ph { width: 56px; height: 56px; border-radius: 16px; font-size: 19px; grid-row: 1 / span 2; align-self: center; }
  .mk-card-main { display: contents; }
  .mk-card-name { grid-column: 2; align-self: end; }
  .mk-card .mk-title { grid-column: 2; align-self: start; }
  .mk-card .mk-quals, .mk-card .mk-about, .mk-card .mk-teaches { grid-column: 1 / -1; }
  .mk-card h3 { font-size: 1.08rem; }
  .mk-card .mk-about { font-size: 14px; }
  .mk-card-side { border-inline-start:0; padding-inline-start:0; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
  .mk-card-side .mk-price { grid-column: 1; grid-row: 1; }
  .mk-card-side .mk-next { grid-column: 1; grid-row: 2; font-size: 13px; }
  .mk-card-side .btn { grid-column: 2; grid-row: 1 / span 2; }
  :root[lang="ar"] .mk-card .mk-price b { font-size: 1.25rem; }
  .mk-card .mk-price b { font-size: 1.4rem; }
  .mk-card .mk-sub { display: none; }
}
@media (max-width: 560px) {
  .mk { gap: 12px; }
  .mk .card { padding: 16px 14px; }
  .mk-opts { gap: 8px; }
  .mk-opts button { min-height: 48px; padding: 8px 12px; font-size: 14.5px; }
  .mk-chips { gap: 6px; }
  .mk-chips button { padding: 5px 12px; font-size: 14px; }
  .mk-head .lead { display: none; }
  .mk-t-head { gap: 12px; }
  .mk-ph.lg { width: 72px; height: 72px; border-radius: 18px; font-size: 24px; }
  .mk-promise { grid-template-columns:minmax(0,1fr); padding:12px; gap:10px; }
  .mk-trial { align-items:flex-start; gap:10px; }
  .mk-refund-amount { width:52px; height:52px; font-size:21px; border-radius:12px; }
  .mk-cancel { border-inline-start:0; border-top:1px solid #c5dfd0; padding:10px 0 0; }
  /* the answers and the sorting each in one row that swipes sideways, so the tutors show sooner */
  .mk-tools { display: grid; gap: 8px; }
  .mk-tools > * { min-width: 0; }
  .mk-answers, .mk-bar { flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding-inline: 16px; scrollbar-width: none; }
  .mk-answers::-webkit-scrollbar, .mk-bar::-webkit-scrollbar { display: none; }
  .mk-answers button { flex: none; }
  .mk-days { gap: 6px; }
  .mk-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 961px) and (max-width: 1180px) { .mk-dash .mk-card { grid-template-columns:64px minmax(0,1fr); } .mk-dash .mk-card-side { grid-column:2; grid-template-columns:1fr auto; align-items:center; border-inline-start:0; padding:10px 0 0; border-top:1px solid var(--line); margin-top:8px; } .mk-dash .mk-card-side .btn { grid-column:2; grid-row:1 / span 2; } .mk-dash .mk-card .mk-ph { width:64px; height:64px; } }
