/* ==========================================================================
   Manage Tutor — base design system
   Shared by every screen: tokens, type, buttons, pills, chips, avatars,
   cards, form controls, header, app navigation, footer, modal, notices.
   Page-specific layout lives in public.css, app.css and ops.css.
   ========================================================================== */

:root {
	--green: #1D5BD6;
	--green-dark: #123C8C;
	--green-soft: #E4ECFC;
	--green-tint: #F4F8FF;
	--green-row: #F7FAFF;
	--mint: #9DBCF2;
	--mint-ink: #C3D4F0;
	--ink: #141B2B;
	--ink-2: #3C4454;
	--ink-3: #4A5263;
	--muted: #5B6475;
	--muted-2: #6B7384;
	--muted-3: #8C93A1;
	--on-dark: #B8C1D2;
	--on-dark-2: #D5DBE6;
	--line: #E3E0D6;
	--line-2: #EEEBE3;
	--line-3: #F1EFE8;
	--input: #D9D5C8;
	--input-2: #C9C5B9;
	--dash: #B5B1A5;
	--chip: #F1EFE8;
	--paper: #F6F4EE;
	--paper-2: #FAF9F5;
	--white: #FFFFFF;
	--warn-bg: #FDF3DC;
	--warn: #8A6110;
	--warn-ink: #5E4A12;
	--bad-bg: #FBE7E4;
	--bad: #B9322A;
	--bad-dot: #E2483D;
	--bad-soft: #F4A39B;
	--star: #D9A21B;
	--gold: #F2D78A;
	--stripe: repeating-linear-gradient(135deg, #F1EFE8 0 12px, #EAE7DE 12px 24px);

	--font-head: 'Plus Jakarta Sans', 'Hind Siliguri', sans-serif;
	--font-body: 'Figtree', 'Hind Siliguri', sans-serif;
	--font-mono: ui-monospace, Menlo, Consolas, monospace;

	--shadow-card: 0 10px 30px rgba(20, 27, 43, .06);
	--shadow-float: 0 20px 40px rgba(0, 0, 0, .18);
	--shadow-modal: 0 30px 80px rgba(0, 0, 0, .3);
	--shadow-menu: 0 16px 40px rgba(20, 27, 43, .16);

	--page-pad: 56px;
	--app-pad: 40px;
	--maxw: 1280px;
}

/* --------------------------------------------------------------------------
   Reset and type
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); color: inherit; margin: 0; }
p { margin: 0; }
b, strong { font-weight: 700; }
mark { background: none; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line-2); margin: 0; }
.screen-reader-text, .mt-sr {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.screen-reader-text:focus { clip: auto; width: auto; height: auto; padding: 10px 14px; background: #fff; z-index: 1000; top: 8px; left: 8px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

.mt-head { font-family: var(--font-head); }
.mt-h1 { font-family: var(--font-head); font-size: 34px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 6px; }
.mt-h1--xl { font-size: 36px; line-height: 1.1; }
.mt-h1--bold { font-weight: 800; letter-spacing: -.02em; }
.mt-h2 { font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.mt-h3 { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.mt-sub { font-size: 15px; color: var(--muted); }
.mt-muted { color: var(--muted-2); }
.mt-small { font-size: 13px; }
.mt-xs { font-size: 12px; }
.mt-mono { font-family: var(--font-mono); font-size: 12px; }
.mt-nowrap { white-space: nowrap; }
.mt-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mt-ok-text { color: var(--green); font-weight: 600; }
.mt-bad-text { color: var(--bad); font-weight: 600; }
.mt-warn-text { color: var(--warn); font-weight: 600; }
.mt-price { font-family: var(--font-head); font-weight: 700; }
.mt-price small, .mt-per { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--muted-2); }
.mt-eyebrow {
	font-size: 13px; font-weight: 700; color: var(--muted-2);
	text-transform: uppercase; letter-spacing: .08em;
}
.mt-eyebrow--sm { font-size: 12px; }
.mt-eyebrow--xs { font-size: 11px; letter-spacing: .06em; }
.mt-link { font-size: 14px; font-weight: 600; color: var(--green); }
.mt-link--sm { font-size: 13px; }
.mt-crumbs { font-size: 13px; color: var(--muted-2); }
.mt-crumbs a { color: var(--muted-2); }
.mt-crumbs a:hover { color: var(--green); }
.mt-crumbs b { color: var(--ink); }
.mt-back { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; color: var(--green); }
.mt-stack { display: flex; flex-direction: column; }
.mt-row { display: flex; align-items: center; }
.mt-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mt-gap-4 { gap: 4px; } .mt-gap-6 { gap: 6px; } .mt-gap-8 { gap: 8px; } .mt-gap-10 { gap: 10px; }
.mt-gap-12 { gap: 12px; } .mt-gap-14 { gap: 14px; } .mt-gap-16 { gap: 16px; } .mt-gap-18 { gap: 18px; }
.mt-gap-20 { gap: 20px; } .mt-gap-22 { gap: 22px; } .mt-gap-24 { gap: 24px; } .mt-gap-28 { gap: 28px; }
.mt-wrap { flex-wrap: wrap; }
.mt-grow { flex: 1; min-width: 0; }
.mt-none { flex: none; }
.mt-hidden { display: none !important; }
.mt-icon-inline { display: inline-flex; align-items: center; gap: 6px; }
.mt-stars { color: var(--star); letter-spacing: 2px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.mt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	border: 1px solid transparent; border-radius: 10px;
	background: var(--green); color: #fff;
	font-size: 14px; font-weight: 600; line-height: 1.2;
	padding: 11px 18px; text-decoration: none; white-space: nowrap;
	transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.mt-btn:hover { background: var(--green-dark); color: #fff; }
.mt-btn:disabled, .mt-btn.is-disabled { opacity: .5; pointer-events: none; }
.mt-btn--bold { font-weight: 700; }
.mt-btn--lg { font-size: 15px; font-weight: 700; padding: 14px 22px; border-radius: 11px; }
.mt-btn--xl { font-size: 15px; font-weight: 700; padding: 15px; border-radius: 11px; }
.mt-btn--sm { font-size: 13px; padding: 9px 14px; border-radius: 9px; }
.mt-btn--xs { font-size: 12px; font-weight: 700; padding: 8px 12px; border-radius: 8px; }
.mt-btn--block { display: flex; width: 100%; }
.mt-btn--outline { background: #fff; color: var(--ink); border-color: var(--input); }
.mt-btn--outline:hover { background: var(--paper-2); color: var(--ink); border-color: var(--input-2); }
.mt-btn--ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.mt-btn--ghost:hover { background: var(--chip); color: var(--ink); }
.mt-btn--danger { background: #fff; color: var(--bad); border-color: var(--input); }
.mt-btn--danger:hover { background: var(--bad-bg); color: var(--bad); }
.mt-btn--green-outline { background: #fff; color: var(--green); border-color: var(--green); font-weight: 700; }
.mt-btn--green-outline:hover { background: var(--green-soft); color: var(--green); }
.mt-btn--dark { background: var(--ink); color: #fff; }
.mt-btn--dark:hover { background: #000; color: #fff; }
.mt-btn--white { background: #fff; color: var(--ink); font-weight: 700; }
.mt-btn--white:hover { background: var(--paper); color: var(--ink); }
.mt-btn--on-dark { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.mt-btn--on-dark:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.mt-btn--star { background: var(--warn-bg); color: var(--warn); font-weight: 700; }
.mt-btn--star:hover { background: #F8E7BC; color: var(--warn); }
.mt-btn--icon { width: 40px; height: 40px; padding: 0; border-radius: 10px; }
.mt-btn--icon.mt-btn--sm { width: 32px; height: 32px; border-radius: 8px; }
.mt-linkbtn { background: none; border: 0; padding: 0; font-weight: 600; color: var(--green); font-size: 14px; }
.mt-linkbtn:hover { color: var(--green-dark); }
.mt-linkbtn--muted { color: var(--ink-2); }
.mt-linkbtn--danger { color: var(--bad); }
.mt-inline-form { display: inline; margin: 0; }

/* --------------------------------------------------------------------------
   Pills, chips, badges
   -------------------------------------------------------------------------- */

.mt-pill {
	display: inline-flex; align-items: center; gap: 5px;
	font-size: 11px; font-weight: 700; line-height: 1.3;
	padding: 3px 8px; border-radius: 999px; white-space: nowrap;
	background: var(--chip); color: var(--ink-2);
}
.mt-pill--ok { background: var(--green-soft); color: var(--green); }
.mt-pill--warn { background: var(--warn-bg); color: var(--warn); }
.mt-pill--bad { background: var(--bad-bg); color: var(--bad); }
.mt-pill--neutral { background: var(--chip); color: var(--ink-2); }
.mt-pill--muted { background: var(--chip); color: var(--muted-2); }
.mt-pill--dark { background: var(--ink); color: #fff; }
.mt-pill--solid { background: var(--green); color: #fff; }
.mt-pill--md { font-size: 12px; padding: 5px 11px; }
.mt-pill--sm { font-size: 11px; padding: 4px 9px; }
.mt-pill--new { background: var(--bad-bg); color: var(--bad); font-size: 12px; padding: 3px 8px; }

.mt-chip {
	display: inline-flex; align-items: center;
	background: var(--chip); color: var(--ink);
	font-size: 12px; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
}
.mt-chip--green { background: var(--green-soft); color: var(--green); font-weight: 600; }
.mt-chip--lg { font-size: 13px; padding: 6px 12px; }
.mt-chips-row { display: flex; gap: 6px; flex-wrap: wrap; }

.mt-badge-check { display: inline-flex; align-items: center; gap: 5px; background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; }
.mt-badge-check--muted { background: var(--chip); color: var(--muted-2); }
.mt-verified { display: inline-flex; vertical-align: -2px; flex: none; }
.mt-name-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-weight: 700; }
.mt-rating { display: inline-flex; align-items: center; gap: 5px; }
.mt-rating b { font-weight: 700; }
.mt-rating span { color: var(--muted-2); }
.mt-flag { background: var(--bad-bg); color: var(--bad); font-weight: 600; padding: 1px 4px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   Avatars and logo
   -------------------------------------------------------------------------- */

.mt-avatar {
	display: inline-grid; place-items: center; flex: none;
	border-radius: 50%; overflow: hidden;
	font-weight: 700; line-height: 1;
	background: var(--green-soft); color: var(--green);
	width: 40px; height: 40px; font-size: 13px;
}
.mt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mt-avatar--xs { width: 28px; height: 28px; font-size: 10px; }
.mt-avatar--sm { width: 32px; height: 32px; font-size: 11px; }
.mt-avatar--md { width: 40px; height: 40px; font-size: 13px; }
.mt-avatar--ml { width: 44px; height: 44px; font-size: 14px; }
.mt-avatar--lg { width: 52px; height: 52px; font-size: 17px; font-family: var(--font-head); }
.mt-avatar--xl { width: 56px; height: 56px; font-size: 19px; font-family: var(--font-head); }
.mt-avatar--xxl { width: 60px; height: 60px; font-size: 21px; font-family: var(--font-head); }
.mt-avatar--hero { width: 96px; height: 96px; font-size: 32px; font-family: var(--font-head); }
.mt-avatar--sand { background: var(--chip); color: var(--ink); }
.mt-avatar--yellow { background: var(--warn-bg); color: var(--warn); }
.mt-avatar--red { background: var(--bad-bg); color: var(--bad); }
.mt-avatar--white { background: #fff; color: var(--green); }
.mt-avatar--ghost { background: rgba(255, 255, 255, .14); color: #fff; }
.mt-avatar--mint { background: var(--mint); color: var(--ink); }
.mt-avatar-stack { display: flex; }
.mt-avatar-stack .mt-avatar { border: 2px solid #fff; }
.mt-avatar-stack .mt-avatar + .mt-avatar { margin-left: -8px; }

.mt-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.mt-logo:hover { color: var(--ink); }
.mt-logo__mark {
	width: 34px; height: 34px; border-radius: 10px; flex: none;
	background: var(--green); color: #fff;
	display: grid; place-items: center;
	font-family: var(--font-head); font-weight: 700; font-size: 17px;
}
.mt-logo__word { font-family: var(--font-head); font-weight: 700; font-size: 19px; letter-spacing: -.01em; white-space: nowrap; }
.mt-logo__img { display: block; height: 44px; width: auto; max-width: none; }
.mt-logo--sm .mt-logo__img { height: 38px; }
.mt-footer .mt-logo__img { height: 54px; }
.mt-auth__aside .mt-logo__img { height: 52px; }
.mt-logo--sm .mt-logo__mark { width: 32px; height: 32px; border-radius: 9px; font-size: 16px; }
.mt-logo--sm .mt-logo__word { font-size: 18px; }
.mt-logo--light { color: #fff; }
.mt-logo--light:hover { color: #fff; }
.mt-logo--light .mt-logo__mark { background: #fff; color: var(--green); }

/* --------------------------------------------------------------------------
   Cards and blocks
   -------------------------------------------------------------------------- */

.mt-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.mt-card--16 { border-radius: 16px; }
.mt-card--14 { border-radius: 14px; padding: 20px; }
.mt-card--flush { padding: 0; overflow: hidden; }
.mt-card--lift { box-shadow: var(--shadow-card); }
.mt-card--dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.mt-card--paper { background: var(--paper); border-color: transparent; border-radius: 12px; padding: 14px 16px; }
.mt-card--warn { background: var(--warn-bg); border-color: transparent; color: var(--warn-ink); border-radius: 14px; padding: 16px 18px; font-size: 13px; line-height: 1.5; }
.mt-card--sticky { position: sticky; top: 20px; }
.mt-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }

.mt-section-num {
	width: 28px; height: 28px; border-radius: 50%; flex: none;
	background: var(--green); color: #fff;
	display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.mt-section-num--sm { width: 26px; height: 26px; font-size: 12px; }
.mt-section-title { display: flex; align-items: center; gap: 12px; }
.mt-section-title h2, .mt-section-title .mt-h2 { font-size: 20px; }

.mt-stats { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.mt-stats--plain { background: transparent; border-color: var(--line-2); border-radius: 14px; }
.mt-stat { padding: 20px 22px; border-right: 1px solid var(--line-2); min-width: 0; }
.mt-stat:last-child { border-right: 0; }
.mt-stat__value { font-family: var(--font-head); font-size: 26px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.mt-stat__label { font-size: 13px; color: var(--muted); }

.mt-facts { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.mt-fact { padding: 16px 18px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); min-width: 0; }
.mt-fact:nth-child(3n) { border-right: 0; }
.mt-fact__k { font-size: 12px; color: var(--muted-2); }
.mt-fact__v { font-weight: 700; font-size: 15px; margin-top: 2px; }
.mt-facts--compact .mt-fact { padding: 12px 16px; font-size: 13px; }
.mt-facts--compact .mt-fact__k { font-size: 13px; }
.mt-facts--compact .mt-fact__v { font-size: 13px; margin: 0; }

.mt-progress { height: 8px; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.mt-progress > span { display: block; height: 100%; border-radius: 8px; background: var(--green); }
.mt-progress--dark { background: rgba(255, 255, 255, .12); }
.mt-progress--dark > span { background: var(--mint); }

.mt-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mt-step { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--muted-3); }
.mt-step::before { content: ""; height: 5px; border-radius: 5px; background: var(--line); }
.mt-step.is-done { color: var(--green); font-weight: 600; }
.mt-step.is-done::before { background: var(--green); }

.mt-checklist { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); }
.mt-checklist li { display: flex; gap: 10px; align-items: center; list-style: none; }
.mt-checklist { padding: 0; margin: 0; }
.mt-check-ok { color: var(--green); font-weight: 800; }
.mt-check-warn { color: var(--warn); font-weight: 800; }
.mt-check-bad { color: var(--bad); font-weight: 800; }

.mt-numbered { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--ink-2); margin: 0; padding: 0; list-style: none; }
.mt-numbered li { display: flex; gap: 10px; }
.mt-numbered li > span:first-child {
	flex: none; width: 22px; height: 22px; border-radius: 50%;
	background: var(--green-soft); color: var(--green);
	font-size: 12px; font-weight: 700; display: grid; place-items: center;
}

.mt-placeholder {
	border-radius: 12px; background: var(--stripe);
	display: flex; align-items: flex-end; padding: 10px;
	font: 600 11px var(--font-mono); color: var(--muted);
}

.mt-empty {
	text-align: center; padding: 40px 24px; color: var(--muted);
	background: #fff; border: 1px dashed var(--input); border-radius: 16px;
}
.mt-empty h3 { font-family: var(--font-head); font-size: 18px; color: var(--ink); margin-bottom: 6px; }
.mt-empty .mt-btn { margin-top: 16px; }

.mt-quote { font-size: 14px; line-height: 1.55; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 12px; }
.mt-lock-note { font-size: 13px; color: var(--muted); line-height: 1.5; display: flex; gap: 8px; }
.mt-lock-note svg { flex: none; margin-top: 2px; }

/* Tabs (underline) */
.mt-tabs-line { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 16px; }
.mt-tabs-line__list { display: flex; gap: 28px; font-size: 14px; font-weight: 600; overflow-x: auto; }
.mt-tabs-line__list a { padding: 0 0 12px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mt-tabs-line__list a.is-active { color: var(--ink); border-bottom-color: var(--green); }
.mt-tabs-line__list a span { color: var(--muted-2); }

/* Pill tabs (filters) */
.mt-pilltabs { display: flex; gap: 8px; font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.mt-pilltabs a { border: 1px solid var(--input); background: #fff; color: var(--ink); padding: 9px 16px; border-radius: 999px; white-space: nowrap; }
.mt-pilltabs a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.mt-pilltabs--sm { font-size: 13px; gap: 6px; }
.mt-pilltabs--sm a { padding: 7px 12px; }
.mt-pilltabs--xs { font-size: 12px; gap: 6px; }
.mt-pilltabs--xs a { padding: 6px 10px; }

/* Segmented tabs (grey track) */
.mt-segtabs { display: inline-flex; gap: 4px; background: var(--chip); border-radius: 10px; padding: 4px; font-size: 13px; font-weight: 600; flex-wrap: wrap; }
.mt-segtabs a { padding: 7px 11px; color: var(--ink-3); border-radius: 7px; white-space: nowrap; }
.mt-segtabs a span { color: var(--muted-3); }
.mt-segtabs a.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.mt-segtabs a.is-active span { color: var(--muted-2); }

/* Pager (mt_pager) */
.mt-pager { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.mt-pager__btn { border: 1px solid var(--input); padding: 6px 10px; border-radius: 8px; color: var(--ink); background: #fff; }
.mt-pager__btn.is-strong { font-weight: 600; }
.mt-pager__btn.is-disabled { color: var(--muted-3); }
.mt-pager__info { padding: 6px 8px; }
[hidden] { display: none !important; }

/* Notices */
.mt-notice {
	display: flex; justify-content: space-between; align-items: center; gap: 16px;
	padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 600;
	background: var(--green-soft); color: var(--green); margin: 0 0 18px;
}
.mt-notice--warn { background: var(--warn-bg); color: var(--warn); }
.mt-notice--bad { background: var(--bad-bg); color: var(--bad); }
.mt-notice__x { color: inherit; font-size: 18px; line-height: 1; opacity: .7; }
.mt-notice__x:hover { color: inherit; opacity: 1; }
.mt-notice-wrap { max-width: var(--maxw); margin: 0 auto; padding: 18px var(--app-pad) 0; }
.mt-notice-wrap .mt-notice { margin: 0; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.mt-form { margin: 0; }
.mt-field { display: flex; flex-direction: column; min-width: 0; }
.mt-label { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.mt-label--tight { margin-bottom: 6px; }
.mt-label .mt-optional { font-weight: 400; color: var(--muted-2); }
.mt-help { font-size: 12px; color: var(--muted-2); margin-top: 6px; display: flex; gap: 6px; align-items: center; line-height: 1.45; }
.mt-help svg { flex: none; }
.mt-input, .mt-textarea, .mt-select select {
	width: 100%; background: #fff; border: 1px solid var(--input); border-radius: 10px;
	padding: 12px 14px; font-size: 15px; line-height: 1.4; color: var(--ink);
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none; appearance: none;
}
.mt-input--sm, .mt-select--sm select { padding: 11px 13px; font-size: 14px; }
.mt-input::placeholder, .mt-textarea::placeholder { color: var(--muted-2); }
.mt-input:focus, .mt-textarea:focus, .mt-select select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 1px var(--green); }
.mt-textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.mt-select { position: relative; display: block; }
.mt-select select { padding-right: 36px; cursor: pointer; }
.mt-select::after { content: "▾"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; font-size: 13px; }
.mt-money { position: relative; display: block; }
.mt-money > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-weight: 700; pointer-events: none; }
.mt-money .mt-input { padding-left: 32px; font-weight: 700; }
.mt-money--lg .mt-input { font-size: 17px; border-width: 2px; border-color: var(--green); padding-top: 11px; padding-bottom: 11px; }
.mt-search { position: relative; display: block; }
.mt-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.mt-search .mt-input { padding-left: 38px; font-size: 14px; padding-top: 11px; padding-bottom: 11px; }
.mt-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mt-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mt-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.mt-is-edited .mt-input, .mt-is-edited .mt-textarea, .mt-is-edited .mt-select select { border: 2px solid var(--star); }
.mt-edited-tag { font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-bg); padding: 2px 7px; border-radius: 999px; display: none; }
.mt-is-edited .mt-edited-tag { display: inline; }
.mt-was { font-size: 12px; color: var(--muted-2); margin-top: 5px; display: none; }
.mt-is-edited .mt-was { display: block; }

/* Checkbox chips (subjects, mediums…) */
.mt-chips { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.mt-chips--sm { gap: 6px; font-size: 13px; }
.mt-chipbox { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.mt-chipbox input { position: absolute; opacity: 0; pointer-events: none; }
.mt-chipbox span {
	display: inline-flex; align-items: center; gap: 4px;
	padding: 9px 14px; border-radius: 999px; border: 1px solid var(--input);
	background: #fff; color: var(--ink); line-height: 1.2; white-space: nowrap;
	transition: background .12s, color .12s, border-color .12s;
}
.mt-chips--sm .mt-chipbox span { padding: 7px 12px; }
.mt-chips--xs .mt-chipbox span { padding: 5px 10px; font-size: 13px; }
.mt-chipbox:hover span { border-color: var(--input-2); }
.mt-chipbox input:checked + span { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.mt-chipbox--check input:checked + span::before { content: "✓"; }
.mt-chipbox--remove input:checked + span::after { content: "×"; margin-left: 2px; }
.mt-chipbox input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.mt-chip-add {
	display: inline-flex; align-items: center; padding: 9px 14px; border-radius: 999px;
	border: 1px dashed var(--dash); color: var(--muted); background: transparent; font-size: inherit; cursor: pointer;
}
.mt-chips--sm .mt-chip-add { padding: 7px 12px; }

/* Day squares (1–7, Sat–Fri) */
.mt-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; font-size: 14px; font-weight: 600; text-align: center; }
.mt-days--6 { grid-template-columns: repeat(6, 1fr); gap: 4px; font-size: 13px; }
.mt-days .mt-chipbox { display: block; min-width: 0; }
.mt-days .mt-chipbox span { display: block; padding: 10px 0; border-radius: 9px; text-align: center; }
.mt-days--6 .mt-chipbox span { padding: 7px 0; border-radius: 7px; }
.mt-days--sm { font-size: 13px; }
.mt-days--sm .mt-chipbox span { padding: 9px 0; }

/* Segmented radio (Boy / Girl) */
.mt-seg { display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); background: var(--chip); border-radius: 10px; padding: 4px; font-size: 14px; font-weight: 600; text-align: center; }
.mt-seg label { position: relative; margin: 0; cursor: pointer; }
.mt-seg input { position: absolute; opacity: 0; pointer-events: none; }
.mt-seg span { display: block; padding: 9px; border-radius: 7px; color: var(--muted); white-space: nowrap; }
.mt-seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.mt-seg input:focus-visible + span { outline: 2px solid var(--green); }
.mt-seg--sm { font-size: 13px; }
.mt-seg--sm span { padding: 8px; }
.mt-seg--narrow { max-width: 420px; }

/* Option cards (Offline / Online, guardian / tutor) */
.mt-optcard { position: relative; display: block; cursor: pointer; margin: 0; }
.mt-optcard input { position: absolute; opacity: 0; pointer-events: none; }
.mt-optcard > span { display: block; height: 100%; border: 1px solid var(--input); border-radius: 12px; padding: 15px 17px; background: #fff; }
.mt-optcard input:checked + span { border: 2px solid var(--green); padding: 14px 16px; background: var(--green-tint); }
.mt-optcard b { display: block; font-size: 15px; }
.mt-optcard small { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Switch */
.mt-switch { position: relative; display: inline-block; flex: none; width: 36px; height: 22px; }
.mt-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.mt-switch__track { position: absolute; inset: 0; border-radius: 999px; background: var(--input-2); transition: background .15s; }
.mt-switch__track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.mt-switch input:checked + .mt-switch__track { background: var(--green); }
.mt-switch input:checked + .mt-switch__track::after { transform: translateX(14px); }
.mt-switch input:focus-visible + .mt-switch__track { outline: 2px solid var(--green); outline-offset: 2px; }
.mt-switch--lg { width: 44px; height: 26px; }
.mt-switch--lg .mt-switch__track::after { width: 20px; height: 20px; }
.mt-switch--lg input:checked + .mt-switch__track::after { transform: translateX(18px); }
.mt-toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--paper); border-radius: 10px; padding: 12px 14px; font-size: 13px; font-weight: 600; }
.mt-toggle-row small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }

/* Checkbox with green tick */
.mt-check { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.mt-check input { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; border-radius: 5px; border: 1.5px solid var(--input-2); background: #fff; display: grid; place-items: center; cursor: pointer; }
.mt-check input:checked { background: var(--green); border-color: var(--green); }
.mt-check input:checked::after { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg); }
.mt-check--sm input { width: 16px; height: 16px; border-radius: 4px; }
.mt-check--sm input:checked::after { width: 8px; height: 5px; border-width: 0 0 2px 2px; }

/* File drop */
.mt-drop { position: relative; display: block; border: 2px dashed var(--input-2); border-radius: 12px; padding: 20px; text-align: center; font-size: 14px; color: var(--ink-3); cursor: pointer; }
.mt-drop:hover, .mt-drop.is-over { border-color: var(--green); background: var(--green-tint); }
.mt-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.mt-drop b { color: var(--green); }
.mt-drop__files { display: block; margin-top: 6px; font-size: 12px; color: var(--green); font-weight: 600; }

/* --------------------------------------------------------------------------
   Public header
   -------------------------------------------------------------------------- */

.mt-header { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.mt-header__in { max-width: var(--maxw); margin: 0 auto; height: 72px; padding: 0 var(--page-pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.mt-header__nav .mt-menu { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; font-size: 14px; font-weight: 500; }
.mt-header__nav a { color: var(--ink-2); }
.mt-header__nav a:hover, .mt-header__nav .current-menu-item a { color: var(--green); }
.mt-header__cta { display: flex; gap: 8px; align-items: center; }
.mt-header__login.mt-btn { color: var(--green); border-color: var(--green); background: transparent; }
.mt-header__login.mt-btn:hover { background: var(--green-soft); color: var(--green); border-color: var(--green); }
.mt-burger { display: none; width: 40px; height: 40px; border: 0; background: none; padding: 0; color: var(--ink); align-items: center; justify-content: center; }
.mt-mobile-menu { display: none; }

/* --------------------------------------------------------------------------
   App navigation (guardian / tutor)
   -------------------------------------------------------------------------- */

.mt-appnav { background: #fff; border-bottom: 1px solid #E6E2D7; position: relative; z-index: 20; }
.mt-appnav__in { height: 68px; padding: 0 var(--app-pad); display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: var(--maxw); margin: 0 auto; }
.mt-appnav__left { display: flex; align-items: center; gap: 36px; min-width: 0; }
.mt-appnav__brand { display: flex; align-items: center; gap: 10px; }
.mt-appnav__role { font-size: 11px; font-weight: 600; color: var(--green); background: var(--green-soft); padding: 3px 8px; border-radius: 999px; margin-left: 4px; }
.mt-appnav__links { display: flex; gap: 4px; font-size: 14px; font-weight: 500; }
.mt-appnav__links a { padding: 8px 14px; border-radius: 9px; color: var(--muted); white-space: nowrap; }
.mt-appnav__links a:hover { color: var(--ink); background: var(--paper); }
.mt-appnav__links a.is-active { background: var(--chip); color: var(--ink); font-weight: 600; }
.mt-appnav__right { display: flex; align-items: center; gap: 18px; }
.mt-appnav__bell { position: relative; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #E6E2D7; display: grid; place-items: center; color: var(--ink-2); }
.mt-appnav__bell .mt-dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad-dot); border: 2px solid #fff; box-sizing: content-box; }
.mt-usermenu { position: relative; }
.mt-usermenu > summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 600; }
.mt-usermenu > summary::-webkit-details-marker { display: none; }
.mt-usermenu__panel, .mt-menu-pop {
	position: absolute; right: 0; top: calc(100% + 10px); min-width: 200px;
	background: #fff; border: 1px solid var(--line); border-radius: 12px;
	box-shadow: var(--shadow-menu); padding: 6px; z-index: 50;
	display: flex; flex-direction: column; font-size: 13px; text-align: left;
}
.mt-usermenu__panel a, .mt-menu-pop a, .mt-menu-pop button {
	display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px;
	color: var(--ink); background: none; border: 0; font-size: 13px; font-weight: 500;
}
.mt-usermenu__panel a:hover, .mt-menu-pop a:hover, .mt-menu-pop button:hover { background: var(--paper); color: var(--ink); }
.mt-menu-pop .is-danger { color: var(--bad); font-weight: 600; }
.mt-menu-pop hr, .mt-usermenu__panel hr { margin: 4px 0; }
.mt-menu-pop form { margin: 0; }

/* Mobile tab bar */
.mt-tabbar { display: none; }

/* --------------------------------------------------------------------------
   Modal (server-rendered overlay; close link removes ?modal=)
   -------------------------------------------------------------------------- */

.mt-modal { position: fixed; inset: 0; z-index: 100; background: rgba(20, 27, 43, .55); display: grid; place-items: center; grid-template-columns: minmax(0, 1fr); padding: 20px; overflow-y: auto; }
.mt-modal__box { width: 560px; max-width: 100%; min-width: 0; justify-self: center; background: #fff; border-radius: 20px; box-shadow: var(--shadow-modal); overflow: hidden; }
.mt-modal__box--520 { width: 520px; }
.mt-modal__head { padding: 28px 28px 20px; display: flex; gap: 16px; align-items: center; border-bottom: 1px solid var(--line-2); }
.mt-modal__head--top { align-items: flex-start; padding-top: 26px; }
.mt-modal__title { font-family: var(--font-head); font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.mt-modal__title--x { font-weight: 800; }
.mt-modal__close { font-size: 22px; color: var(--muted-2); line-height: 1; margin-left: auto; }
.mt-modal__close:hover { color: var(--ink); }
.mt-modal__body { padding: 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.mt-modal__foot { padding: 18px 28px; background: var(--paper); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
body.mt-modal-open { overflow: hidden; }

/* Payment method tiles */
.mt-paymethods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mt-paymethod { position: relative; display: block; margin: 0; cursor: pointer; }
.mt-paymethod input { position: absolute; opacity: 0; pointer-events: none; }
.mt-paymethod span { display: block; border: 1px solid var(--input); border-radius: 12px; padding: 15px 6px; text-align: center; font-weight: 800; font-size: 15px; }
.mt-paymethod input:checked + span { border: 2px solid var(--green); padding: 14px 5px; box-shadow: 0 0 0 3px var(--green-soft); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.mt-footer { background: var(--ink); color: #fff; }
.mt-footer__in { max-width: var(--maxw); margin: 0 auto; padding: 72px var(--page-pad) 0; }
.mt-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.mt-footer__about { display: flex; flex-direction: column; gap: 20px; }
.mt-footer__about p { font-size: 14px; line-height: 1.6; color: var(--on-dark); max-width: 300px; }
.mt-social { display: flex; gap: 8px; }
.mt-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .08); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; }
.mt-social a:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.mt-footer__col { display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: var(--on-dark-2); }
.mt-footer__col h3 { font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--mint); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.mt-footer__col .mt-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.mt-footer__col a { color: var(--on-dark-2); }
.mt-footer__col a:hover { color: #fff; }
.mt-footer__addr { line-height: 1.5; color: var(--on-dark); }
.mt-footer__blurb { font-size: 13px !important; color: var(--muted-3) !important; }
address.mt-footer__addr { font-style: normal; }
.mt-footer__seo { padding: 40px 0 44px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.mt-footer__seotitle { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 22px; }
.mt-footer__seogrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.mt-footer__links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.mt-footer__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 24px 0; font-size: 13px; color: var(--muted-3); flex-wrap: wrap; }
.mt-footer__bar .mt-menu { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.mt-footer__bar a { color: var(--muted-3); }
.mt-footer__bar a:hover { color: #fff; }

/* Google sign-in */
.mt-google { display: flex; flex-direction: column; gap: 10px; }
.mt-google__btn {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	background: #fff; border: 1px solid var(--input); border-radius: 12px; padding: 15px;
	font-weight: 700; font-size: 16px; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}
.mt-google__btn:hover { border-color: var(--input-2); color: var(--ink); background: var(--paper-2); }
.mt-google__sitekit { display: flex; justify-content: center; min-height: 44px; }
.mt-google__hint { font-size: 12px; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: 8px 10px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
	:root { --page-pad: 32px; --app-pad: 24px; }
	.mt-header__nav .mt-menu { gap: 20px; }
	.mt-appnav__left { gap: 20px; }
	.mt-footer__grid { grid-template-columns: 1fr 1fr 1fr; }
	.mt-footer__about { grid-column: 1 / -1; }
	.mt-footer__seogrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
	:root { --page-pad: 20px; --app-pad: 20px; }
	body { font-size: 15px; }
	.mt-header__in { height: 60px; }
	.mt-header__nav, .mt-header__cta .mt-header__login, .mt-header__cta .mt-btn { display: none; }
	.mt-burger { display: inline-flex; }
	.mt-logo__mark { width: 30px; height: 30px; border-radius: 9px; font-size: 15px; }
	.mt-logo__word { font-size: 17px; }
	.mt-logo__img { height: 38px; }
	.mt-mobile-menu[open], .mt-mobile-menu.is-open { display: block; }
	.mt-mobile-menu { background: #fff; border-bottom: 1px solid var(--line); padding: 8px var(--page-pad) 20px; }
	.mt-mobile-menu .mt-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
	.mt-mobile-menu .mt-menu a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line-2); color: var(--ink); font-weight: 600; }
	.mt-mobile-menu .mt-btn { margin-top: 14px; }

	.mt-appnav__in { height: 60px; }
	.mt-appnav__links, .mt-appnav__bell, .mt-usermenu__name { display: none; }
	.mt-appnav__role { display: none; }

	.mt-tabbar {
		display: grid; grid-template-columns: repeat(var(--n, 3), 1fr);
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
		height: calc(64px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom);
		background: #fff; border-top: 1px solid #E6E2D7;
	}
	.mt-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted-2); padding-top: 0; }
	.mt-tabbar a::before { content: ""; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: transparent; }
	.mt-tabbar a svg { color: var(--input-2); }
	.mt-tabbar a.is-active { color: var(--green); font-weight: 700; }
	.mt-tabbar a.is-active::before { background: var(--green); }
	.mt-tabbar a.is-active svg { color: var(--green); }
	body.mt-has-tabbar { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

	.mt-h1 { font-size: 28px; }
	.mt-grid-2, .mt-grid-3, .mt-grid-4 { grid-template-columns: 1fr; gap: 14px; }
	.mt-stats { grid-template-columns: 1fr 1fr; }
	.mt-stat:nth-child(2) { border-right: 0; }
	.mt-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
	.mt-facts { grid-template-columns: 1fr 1fr; }
	.mt-fact:nth-child(3n) { border-right: 1px solid var(--line-2); }
	.mt-fact:nth-child(2n) { border-right: 0; }
	.mt-card { padding: 20px; }
	.mt-modal { align-items: end; padding: 0; }
	.mt-modal__box { border-radius: 20px 20px 0 0; }
	.mt-modal__head, .mt-modal__body, .mt-modal__foot { padding-left: 20px; padding-right: 20px; }
	.mt-paymethods { grid-template-columns: 1fr 1fr; }
	.mt-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
	.mt-footer__in { padding-top: 48px; }
	.mt-days .mt-chipbox span { padding: 9px 0; }
	.mt-tabs-line { flex-wrap: wrap; }
}

@media (max-width: 480px) {
	.mt-footer__grid { grid-template-columns: 1fr; }
	.mt-btn--lg { padding: 13px 18px; }
}

@media print {
	.mt-header, .mt-appnav, .mt-footer, .mt-tabbar { display: none; }
}

/* Four-option segmented controls wrap to two rows on phones. */
@media (max-width: 560px) {
	.mt-seg { grid-template-columns: repeat(min(var(--n, 2), 2), 1fr); }
}

/* Required-field star and the shared address picker. */
.mt-req { color: var(--bad); font-weight: 700; }
.mt-geo { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 1100px) and (min-width: 861px) {
	.mt-geo .mt-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mt-geo .mt-label { justify-content: flex-start; gap: 4px; }
.mt-input--date { max-width: 220px; }
.mt-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Trusted badge tick on a profile photo (bottom right, like Facebook) */
.mt-avbadge { position: relative; display: inline-flex; flex: none; width: max-content; height: max-content; --tick: 16px; }
.mt-avbadge__tick { position: absolute; right: -2px; bottom: -2px; width: var(--tick); height: var(--tick); display: grid; place-items: center; background: #fff; border-radius: 50%; padding: 1px; box-sizing: content-box; line-height: 0; }
.mt-avbadge__tick svg { width: 100%; height: 100%; }
.mt-avbadge--xs, .mt-avbadge--sm { --tick: 12px; }
.mt-avbadge--sm36, .mt-avbadge--md, .mt-avbadge--ml { --tick: 15px; }
.mt-avbadge--lg, .mt-avbadge--xl, .mt-avbadge--xxl { --tick: 19px; }
.mt-avbadge--hero { --tick: 28px; }
.mt-avbadge--hero .mt-avbadge__tick { right: 2px; bottom: 2px; padding: 2px; }
