/* Danyal Education — shared design ("trusted & personal": B's fonts/menu/layout, C's icons/card-boxing, mobile first). */

:root {
  --teal:       #144C46;
  --teal-dark:  #0D332F;
  --gold:       #C99A3E;
  --gold-ink:   #24190A;
  --ink:        #1F2A28;
  --heading:    #0D332F;
  --text:       #3E4A47;
  --muted:      #6D7A76;
  --muted-2:    #8A9793;
  --line:       #DDE3E0;
  --bg:         #F7F5F0;
  --surface:    #FFFFFF;
  --chip:       #F7F5F0;
  --measure:    40rem;
  --shadow:     0 6px 16px rgba(20, 76, 70, 0.09);
  --shadow-sm:  0 6px 16px rgba(20, 76, 70, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.2;
}

a { color: var(--teal); }
a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

site-header, site-footer { display: block; }

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 24px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  padding: 6px 0;
}
.menu { display: flex; flex-wrap: wrap; column-gap: 16px; }
.menu a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-2);
  text-decoration: none;
  padding: 8px 0;
}
.menu a:hover { color: var(--teal); }
.menu a[aria-current="page"] { color: var(--teal); font-weight: 700; }

/* ── Hero ── */
.band { background: var(--bg); padding: 40px 0 8px; }
/* Profile banner at the top of every page, laid out like studykaki.com: centred round logo, title, tagline */
.band .wrap { text-align: center; }
.hero-logo { display: block; width: 96px; height: 96px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); margin: 0 auto 14px; }
.eyebrow {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.band h1 { color: var(--heading); font-size: 1.85rem; }
.band .tagline {
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  margin-top: 6px;
  font-size: 1rem;
}
.band .lead { margin-top: 18px; font-size: 1.02rem; line-height: 1.75; color: var(--text); }
.band .lead strong { color: var(--heading); font-weight: 700; }

/* ── Buttons ── */
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 20px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; fill: currentColor; }
.btn-stack { flex-direction: column; gap: 2px; }
.btn-sub { font-size: 0.82rem; font-weight: 500; }

.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-primary:hover { background: #b98a2f; border-color: #b98a2f; }

.btn-outline { color: var(--teal); border-color: var(--teal); background: transparent; }
.btn-outline:hover { background: rgba(20, 76, 70, 0.06); }

.btn-secondary { color: var(--teal); border-color: var(--teal); background: var(--surface); }
.btn-secondary:hover { background: var(--bg); }

/* ── Content sections ── */
.block { margin-top: 48px; }
.block > h2 { font-size: 1.4rem; margin-bottom: 18px; }
.block .actions { margin-top: 16px; }

/* Card boxing (from direction C) — the shared "panel" look for grouped content */
.card {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card > * + * { margin-top: 10px; }

/* "Why us" items as icon + card */
.item {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.item:first-child { margin-top: 0; }
.item-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--teal);
  color: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.item-icon svg { width: 19px; height: 19px; }
.item-icon.alt { background: var(--gold); color: var(--gold-ink); }
.item h3 { font-size: 1rem; margin-bottom: 6px; }
.item strong { color: var(--heading); font-weight: 700; }
.item p + .rows { margin-top: 14px; }

/* Stat cards */
.stats { display: flex; gap: 10px; margin-top: 8px; }
.stats > div {
  flex: 1;
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 6px;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-num { display: block; font-family: 'Source Serif 4', Georgia, serif; font-size: 1.4rem; font-weight: 700; color: var(--teal); line-height: 1.1; }
.stat-label { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--muted); line-height: 1.3; }

.tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags span {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--chip);
  color: var(--teal);
  padding: 5px 10px;
  border-radius: 999px;
}
.card .tags span { background: var(--bg); }

.rows { margin-top: 4px; }
.rows > div { padding: 14px 0; border-top: 1px solid var(--line); }
.rows > div:first-child { border-top: none; padding-top: 0; }
.rows > div:last-child { padding-bottom: 0; }
.rows dt { font-weight: 700; color: var(--heading); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.rows dd { color: var(--text); margin-top: 4px; }
.rows dd .sub { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.rows dd span.opt:not(:last-child)::after { content: "\00b7"; margin-left: 6px; }

/* Testimonials */
.quote { margin-top: 14px; }
.quote:first-child { margin-top: 0; }
.quote p { font-size: 0.92rem; line-height: 1.75; }
.quote footer { margin-top: 12px; font-size: 0.85rem; }
.quote footer strong { display: block; color: var(--heading); text-transform: capitalize; font-family: 'Source Serif 4', Georgia, serif; }
.quote footer span { color: var(--muted); text-transform: capitalize; }

/* Links page */
.link-list { list-style: none; }
.link-list li { border-top: 1px solid var(--line); }
.link-list li:first-child { border-top: none; }
.link-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; text-decoration: none; color: var(--text); }
.link-list a:hover .link-title { text-decoration: underline; }
.link-title { display: block; font-weight: 700; color: var(--teal); font-family: 'Source Serif 4', Georgia, serif; }
.link-sub { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 2px; }
.link-arrow { font-size: 1.3rem; color: var(--muted-2); line-height: 1; }

/* Enquiry form (/enquiry/) — field markup and behaviour come from the Apps Script form; styles restated in site colours */
.enquiry .card { margin-top: 16px; padding: 22px 18px; }
.enquiry form { margin-top: 32px; }
.enquiry form .card:first-child { margin-top: 0; }
.enquiry .card > h2 {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.enquiry .field { margin-bottom: 20px; }
.enquiry .field:last-child { margin-bottom: 0; }
.enquiry .card > .field { margin-top: 0; }
.enquiry label, .enquiry .label { display: block; font-weight: 600; color: var(--heading); margin-bottom: 6px; }
.enquiry .opt { font-weight: 400; color: var(--muted); }
.enquiry .hint { font-size: 0.88rem; color: var(--muted); margin: -2px 0 8px; }

.enquiry input[type=text], .enquiry input[type=tel], .enquiry textarea {
  width: 100%;
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}
.enquiry textarea { min-height: 88px; resize: vertical; }
.enquiry input:focus, .enquiry textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }

/* Tappable option chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit;
  font-size: 0.94rem;
  padding: 10px 16px;
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background-color .12s, border-color .12s, color .12s;
  -webkit-tap-highlight-color: transparent;
}
/* Subjects: fixed two columns so pairs (Pure Physics | Pure Chemistry) always sit side by side */
.chips[data-group="subjects"] { display: grid; grid-template-columns: 1fr 1fr; }
.chips[data-group="subjects"] .chip { padding: 8px 6px; font-size: 0.88rem; line-height: 1.25; border-radius: 22px; }
.chip:hover { border-color: var(--teal); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.enquiry .field.sub { margin-top: -6px; padding: 12px 0 2px 14px; border-left: 3px solid var(--line); }
.enquiry .field.sub .label { font-weight: 500; font-size: 0.94rem; }
.other-input { margin-top: 10px; display: none; }
.enquiry .other-input.show { display: block; }

.enquiry .consent { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 400; color: var(--text); }
.enquiry .consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--teal); flex: none; }

.enquiry .err { color: #B3261E; font-size: 0.88rem; margin-top: 6px; display: none; }
.enquiry .field.invalid .err { display: block; }
.enquiry .field.invalid input, .enquiry .field.invalid textarea { border-color: #B3261E; }
.enquiry .field.invalid .chip { border-color: #E3B4B0; }

.enquiry .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.enquiry button[type=submit] {
  width: 100%;
  min-height: 52px;
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px;
  border: 0;
  border-radius: 6px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  margin-top: 24px;
}
.enquiry button[type=submit]:hover { background: var(--teal-dark); }
.enquiry button[type=submit]:disabled { opacity: .6; cursor: wait; }
.enquiry .status { text-align: center; margin-top: 14px; font-size: 0.94rem; min-height: 22px; }
.enquiry .status.error { color: #B3261E; }

.enquiry .done { display: none; text-align: center; padding: 48px 20px; }
.enquiry .done h2 { font-family: 'Source Serif 4', Georgia, serif; font-size: 1.75rem; text-transform: none; letter-spacing: 0; color: var(--heading); margin: 0 0 10px; }
.enquiry .done p { color: var(--muted); margin: 0; }
.enquiry .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 1.75rem; margin: 0 auto 18px; }

/* Fee scheme chooser (/fees/) — reuses the enquiry form styles above for fields and the submit button */
.fees form { margin-top: 32px; }
.fees .field[data-name="scheme"] { margin-bottom: 16px; }
.fees .card { margin-top: 0; }
.preview-note {
  margin-top: 24px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #FFF4D6;
  border: 1px solid #E8CF8A;
  color: var(--gold-ink);
  font-size: 0.9rem;
  text-align: center;
}
.schemes { display: grid; gap: 14px; }
.scheme {
  background: var(--surface);
  border-radius: 18px;
  padding: 22px 20px;
  box-shadow: var(--shadow-sm);
  border: 2px solid transparent;
  transition: border-color 0.15s;
}
.scheme.selected { border-color: var(--teal); }
.scheme h3 { font-size: 1.3rem; }
.scheme-sub { margin-top: 2px; font-weight: 600; color: var(--muted); }
.scheme-fee {
  margin-top: 10px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--teal);
  line-height: 1.3;
}
.scheme-fee span { display: block; font-family: 'Work Sans', system-ui, sans-serif; font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.scheme-best {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg);
  font-family: 'Source Serif 4', Georgia, serif;
  font-style: italic;
  color: var(--heading);
  line-height: 1.5;
}
.scheme-list { margin-top: 16px; }
.scheme-list h4 { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.scheme-list ul { padding-left: 1.2em; }
.scheme-list li + li { margin-top: 4px; }
.scheme-more { display: inline-block; margin-top: 16px; font-weight: 600; font-size: 0.94rem; }
.scheme-pick {
  display: block;
  width: 100%;
  margin-top: 18px;
  min-height: 48px;
  font: inherit;
  font-weight: 700;
  border-radius: 6px;
  border: 1.5px solid var(--teal);
  background: var(--surface);
  color: var(--teal);
  cursor: pointer;
}
.scheme-pick:hover { background: var(--bg); }
.scheme-pick[aria-pressed="true"] { background: var(--teal); color: #fff; }
.scheme-pick:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.fees .field.invalid .scheme { border-color: #E3B4B0; }
.fees .done { margin-top: 24px; }
.rate-type {
  display: inline-block; margin-top: 12px; padding: 5px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 0.85rem; font-weight: 600; color: var(--teal);
}
/* Lesson-time step */
.fees .step-summary { color: var(--muted); margin: -6px 0 18px; }
.slot-days { display: grid; gap: 12px; }
.slot-day { display: flex; gap: 12px; align-items: flex-start; }
.slot-day-name { flex: none; width: 36px; padding-top: 11px; font-weight: 700; color: var(--heading); font-size: 0.9rem; }
.slot-day .chips { flex: 1; }
.chip.slot { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 0.9rem; }
.chip.slot .rank:empty { display: none; }
.chip.slot .rank {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: var(--teal); font-size: 0.75rem; font-weight: 700;
}
.chip.slot:disabled { cursor: not-allowed; color: var(--muted-2); background: var(--bg); border-style: dashed; }
.chip.slot:disabled:hover { border-color: var(--line); }
.fees .field.invalid .chip.slot:not(:disabled) { border-color: #E3B4B0; }
.back-link {
  display: block; margin: 16px auto 0; padding: 8px 12px;
  font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--teal);
  background: none; border: 0; cursor: pointer;
}
.back-link:hover { text-decoration: underline; }
.fees .done .done-step { margin: 18px 0 20px; color: var(--text); }
.fees .done .btn { max-width: 360px; margin: 0 auto; }

@media (min-width: 560px) {
  .schemes { grid-template-columns: 1fr 1fr; }
}

/* Fee scheme details (/fees/details/) */
.terms .terms-jump { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 24px 0 20px; }
.terms .terms-jump a {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.terms .card { margin-top: 16px; padding: 24px 20px; scroll-margin-top: 16px; }
.terms .card h2 { font-size: 1.3rem; }
.terms .terms-fee { font-family: 'Source Serif 4', Georgia, serif; font-weight: 700; color: var(--teal); margin-top: 4px; }
.terms .terms-fee a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
/* The fee table stands out, and flashes when a "fee table above" link jumps to it. */
.terms .fee-card { border: 2px solid var(--teal); }
.terms .fee-card:target { animation: fee-flash 1.6s ease-out; }
@keyframes fee-flash { from { box-shadow: 0 0 0 6px rgba(201, 154, 62, 0.55); } to { box-shadow: var(--shadow); } }
.terms .card h3 {
  font-family: 'Work Sans', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 20px;
}
.terms .card ul { padding-left: 1.2em; margin-top: 6px; }
.terms .card li + li { margin-top: 6px; }
.terms .card strong { color: var(--heading); }

.fee-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 0.88rem; line-height: 1.4; }
.fee-table th, .fee-table td { text-align: left; vertical-align: top; padding: 10px 6px; border-top: 1px solid var(--line); }
.fee-table thead th { border-top: none; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding-top: 0; }
.fee-table tbody th { font-weight: 600; color: var(--heading); width: 34%; }
.fee-table td span { display: block; color: var(--muted); font-size: 0.8rem; }
.fee-table tr.yours th, .fee-table tr.yours td { background: #EEF5F3; }
.fee-table .yours-tag { display: block; margin-top: 4px; font-size: 0.72rem; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: 0.04em; }

/* My Links page (/4me/) */
.hub .card { margin-top: 16px; }
.hub .card:first-child { margin-top: 32px; }
.hub .card h2 { font-size: 1.15rem; }
.hub-note { font-size: 0.88rem; color: var(--muted); }
.hub-list { list-style: none; }
.hub-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.hub-list li:first-child { border-top: none; }
.hub-label { display: block; font-weight: 700; color: var(--heading); line-height: 1.35; min-width: 0; }
.hub-label small { display: block; font-weight: 500; color: var(--teal); font-size: 0.8rem; }
.hub-url { display: block; font-weight: 400; color: var(--muted); font-size: 0.8rem; word-break: break-all; }
.hub-acts { display: flex; gap: 6px; flex-shrink: 0; }
.hub-acts button, .hub-acts a {
  font: inherit; font-size: 0.85rem; font-weight: 600; min-height: 40px; padding: 8px 12px;
  border-radius: 6px; border: 1.5px solid var(--teal); background: var(--surface); color: var(--teal);
  text-decoration: none; cursor: pointer; display: inline-flex; align-items: center;
}
.hub-acts button { background: var(--teal); color: #fff; }

/* ── Footer ── */
.site-footer {
  margin-top: 64px;
  padding: 30px 0 34px;
  background: var(--teal);
  color: #CDE0DB;
  text-align: center;
  font-size: 0.85rem;
}
.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}
.footer-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transition: background-color 0.15s;
}
.footer-links a:hover { background: rgba(255, 255, 255, 0.26); }
.footer-links svg { width: 18px; height: 18px; fill: currentColor; }
.site-footer a:focus-visible { outline-color: #ffffff; }

@media (min-width: 560px) {
  .band { padding: 56px 0 16px; }
  .band h1 { font-size: 2.25rem; }
}
