/* Herts Driver Training - Bookings (matches hertsdriving.com: red #9D0000, Bai Jamjuree headings, Inter buttons) */
.htdb { --htdb-red: #9D0000; --htdb-red-dark: #7a0000; --htdb-ink: #212121; --htdb-soft: #f6f2f2; --htdb-line: #e6dede;
	max-width: 860px; margin: 0 auto; color: var(--htdb-ink); font-size: 17px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; line-height: 1.55; box-sizing: border-box; }
.htdb *, .htdb *::before, .htdb *::after { box-sizing: border-box; }
.htdb a { color: var(--htdb-red); text-decoration: none; font-weight: 600; }
.htdb a:hover, .htdb a:focus { color: var(--htdb-red-dark); text-decoration: none; }
.htdb h2, .htdb h3 { font-family: "Bai Jamjuree", Inter, Arial, sans-serif; font-weight: 500; color: #000; line-height: 1.2; }
.htdb h2 { font-size: 30px; margin: 0 0 8px; }
.htdb h3 { font-size: 22px; margin: 0 0 10px; }
.htdb-card { background: #fff; border: 1px solid var(--htdb-line); border-radius: 10px; padding: 28px; margin: 0 0 20px; box-shadow: 0 2px 14px rgba(0,0,0,.05); }
.htdb-lead { margin: 0 0 18px; color: #555; }
.htdb-small { font-size: 14px; color: #666; }
.htdb-opt { font-weight: 400; color: #777; }

.htdb-steps { display: flex; gap: 8px; list-style: none; margin: 0 0 18px; padding: 0; counter-reset: none; }
.htdb-steps li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 14px; color: #888; padding: 8px 10px; border-radius: 6px; background: var(--htdb-soft); margin: 0; }
.htdb-steps li span { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #d9cfcf; color: #fff; font-weight: 700; font-size: 13px; flex: 0 0 24px; }
.htdb-steps li.is-on { color: var(--htdb-red); font-weight: 600; }
.htdb-steps li.is-on span { background: var(--htdb-red); }

.htdb-pills { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.htdb button { font-family: Inter, Arial, sans-serif; cursor: pointer; }
.htdb-pill { background: #fff; color: var(--htdb-ink); border: 2px solid var(--htdb-line); border-radius: 8px; padding: 14px 12px; font-size: 16px; font-weight: 600; text-align: center; transition: border-color .15s, background .15s; }
.htdb-pill:hover, .htdb-pill:focus-visible, .htdb-pill.is-on { border-color: var(--htdb-red); background: var(--htdb-soft); color: var(--htdb-red); outline: none; }

.htdb-day { margin: 18px 0 8px !important; font-size: 20px !important; }
.htdb-day:first-child { margin-top: 0 !important; }
.htdb-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.htdb-time { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff; color: var(--htdb-ink); border: 2px solid var(--htdb-line); border-radius: 8px; padding: 12px 14px; font-size: 16px; }
.htdb-time strong { color: #000; font-size: 17px; }
.htdb-time span { font-size: 14px; color: #666; font-weight: 400; }
.htdb-time:hover, .htdb-time:focus-visible { border-color: var(--htdb-red); background: var(--htdb-soft); outline: none; }
.htdb-loading { color: #666; }

.htdb-chosen { background: var(--htdb-soft); border-left: 4px solid var(--htdb-red); padding: 10px 14px; border-radius: 4px; margin: 0 0 18px; }
.htdb-form label { display: block; font-weight: 600; font-size: 15px; margin: 0 0 14px; }
.htdb-form input:not([type=radio]):not([type=checkbox]), .htdb-form textarea { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font-size: 16px; font-weight: 400; border: 1px solid #cfc6c6; border-radius: 6px; background: #fff; color: var(--htdb-ink); font-family: inherit; }
.htdb-form input:focus, .htdb-form textarea:focus { border-color: var(--htdb-red); outline: 2px solid rgba(157,0,0,.15); }
.htdb-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.htdb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.htdb-pay { border: 0; padding: 0; margin: 6px 0 16px; }
.htdb-pay legend { font-weight: 600; font-size: 15px; margin-bottom: 8px; padding: 0; }
.htdb-option { display: flex !important; gap: 12px; align-items: flex-start; border: 2px solid var(--htdb-line); border-radius: 8px; padding: 12px 14px; margin: 0 0 10px !important; font-weight: 400 !important; cursor: pointer; }
.htdb-option:has(input:checked) { border-color: var(--htdb-red); background: var(--htdb-soft); }
.htdb-option input { margin-top: 5px; accent-color: var(--htdb-red); width: 18px; height: 18px; flex: 0 0 18px; }
.htdb-option span { font-size: 15px; color: #444; }
.htdb-option strong { display: block; color: #000; font-size: 16px; }
.htdb-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.htdb-check input { margin-top: 4px; accent-color: var(--htdb-red); width: 18px; height: 18px; flex: 0 0 18px; }

.htdb-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.htdb-btn, a.htdb-btn { display: inline-block; background: var(--htdb-red); color: #fff !important; border: 2px solid var(--htdb-red); border-radius: 5px; padding: 12px 24px; font-family: Inter, Arial, sans-serif; font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; }
.htdb-btn:hover, .htdb-btn:focus-visible { background: var(--htdb-red-dark); border-color: var(--htdb-red-dark); color: #fff; }
.htdb-btn:disabled { opacity: .6; cursor: wait; }
.htdb-btn-light { background: #fff; color: var(--htdb-red) !important; }
.htdb-btn-light:hover { background: var(--htdb-soft); color: var(--htdb-red-dark) !important; }
.htdb-back, .htdb-link { background: none; border: 0; padding: 8px 0; color: var(--htdb-red); font-weight: 600; font-size: 15px; }
.htdb-back:hover, .htdb-link:hover { color: var(--htdb-red-dark); }
.htdb-back { margin-top: 14px; }
.htdb-actions .htdb-back { margin-top: 0; }

.htdb-cardbox { border: 1px solid #cfc6c6; border-radius: 6px; padding: 14px 12px; background: #fff; margin: 12px 0 8px; min-height: 50px; }
.htdb-error { background: #fdeaea; color: var(--htdb-red); border-radius: 6px; padding: 10px 14px; font-weight: 600; font-size: 15px; margin: 10px 0; }
.htdb-error[hidden] { display: none; }
.htdb-alert { background: #fdeaea; border: 1px solid #f2c4c4; border-radius: 8px; padding: 14px 16px; margin: 12px 0 18px; }
.htdb-alert p { margin: 0 0 10px; }
.htdb-done h2::before { content: "✓"; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--htdb-red); color: #fff; margin-right: 10px; font-size: 20px; vertical-align: 4px; }

.htdb-weekly { margin: 0 0 14px; }
.htdb-lessons { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--htdb-line); }
.htdb-lesson { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--htdb-line); margin: 0; }
.htdb-lesson .htdb-state { font-size: 15px; color: #555; }
.htdb-lesson.is-skipped_pupil, .htdb-lesson.is-skipped_instructor, .htdb-lesson.is-cancelled { color: #999; }
.htdb-lesson.is-skipped_pupil strong, .htdb-lesson.is-skipped_instructor strong, .htdb-lesson.is-cancelled strong { text-decoration: line-through; }
.htdb-cardpanel { margin-top: 16px; }
.htdb-cardpanel[hidden], .htdb-step[hidden], .htdb-steps[hidden] { display: none; }

@media (max-width: 640px) {
	.htdb { font-size: 16px; }
	.htdb-card { padding: 20px 16px; border-radius: 8px; }
	.htdb h2 { font-size: 24px; }
	.htdb-row { grid-template-columns: 1fr; gap: 0; }
	.htdb-steps li { font-size: 0; justify-content: center; padding: 6px; }
	.htdb-steps li span { font-size: 13px; }
	.htdb-pills { grid-template-columns: 1fr 1fr; }
	.htdb-times { grid-template-columns: 1fr; }
	.htdb-lesson { grid-template-columns: 1fr auto; }
	.htdb-lesson > div:last-child { grid-column: 1 / -1; }
	.htdb-actions { flex-direction: column-reverse; align-items: stretch; }
	.htdb-actions .htdb-btn { text-align: center; }
}

/* 1.1.0: pupil page tabs, progress, reflective log, resources */
.htdb-tabs { display: flex; gap: 6px; margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.htdb-tab { flex: 1 0 auto; background: var(--htdb-soft); color: #444; border: 0; border-radius: 8px; padding: 11px 14px; font-size: 15px; font-weight: 600; }
.htdb-tab.is-on { background: var(--htdb-red); color: #fff; }
.htdb-type { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 600; color: var(--htdb-red); }
.htdb-bar { height: 12px; background: #eee; border-radius: 99px; overflow: hidden; }
.htdb-bar span { display: block; height: 100%; background: linear-gradient(90deg, #4CAF50, #0A8035); border-radius: 99px; }
.htdb-key { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; font-size: 14px; color: #555; }
.htdb-key li { display: flex; align-items: center; gap: 8px; margin: 0; }
.htdb-dots { display: inline-flex; gap: 4px; flex: 0 0 auto; }
.htdb-dots i { width: 12px; height: 12px; border-radius: 50%; background: #e4e4e4; }
.htdb-dots[data-score="1"] i:nth-child(-n+1), .htdb-dots[data-score="2"] i:nth-child(-n+2), .htdb-dots[data-score="3"] i:nth-child(-n+3),
.htdb-dots[data-score="4"] i:nth-child(-n+4), .htdb-dots[data-score="5"] i { background: #4CAF50; }
.htdb-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.htdb-group-head h3 { margin: 0; }
.htdb-ring { --pc: 0; width: 56px; height: 56px; border-radius: 50%; flex: 0 0 56px; display: grid; place-items: center; background: conic-gradient(#4CAF50 calc(var(--pc) * 1%), #eee 0); }
.htdb-ring b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #fff; font-size: 13px; }
.htdb-skills { list-style: none; margin: 0; padding: 0; }
.htdb-skills li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--htdb-line); margin: 0; }
.htdb-skills em { display: block; font-style: normal; font-size: 13px; color: #777; }
.htdb-reflect { padding: 0; overflow: hidden; }
.htdb-reflect-head { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 0; padding: 18px 22px; font-size: 16px; text-align: left; color: var(--htdb-ink); }
.htdb-circles { display: inline-flex; gap: 5px; }
.htdb-circles i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #ccc; }
.htdb-circles i.is-done { background: #4CAF50; border-color: #4CAF50; }
.htdb-reflect-form { padding: 0 22px 22px; }
.htdb-reflect-form label { display: block; font-weight: 600; font-size: 15px; margin: 0 0 12px; }
.htdb-reflect-form textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; padding: 10px; border: 1px solid #cfc6c6; border-radius: 6px; }
.htdb-ok { color: #0A8035; font-weight: 600; }
.htdb-res { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.htdb-res li { margin: 0; }
.htdb-res a { display: flex; justify-content: space-between; padding: 14px 16px; border: 1px solid var(--htdb-line); border-radius: 8px; background: var(--htdb-soft); }
@media (max-width: 600px) { .htdb-card { padding: 20px; } .htdb-tab { font-size: 14px; padding: 10px; } }

/* ===== 1.1.2: keep the theme's button styles (pink) off the plugin's buttons ===== */
.htdb button, .htdb .htdb-btn { box-shadow: none !important; text-transform: none !important; letter-spacing: normal !important; text-decoration: none !important; min-height: 0; width: auto; }
.htdb .htdb-btn, .htdb .htdb-btn:hover, .htdb .htdb-btn:focus, .htdb .htdb-btn:active { background: var(--htdb-red) !important; border: 2px solid var(--htdb-red) !important; color: #fff !important; }
.htdb .htdb-btn:hover, .htdb .htdb-btn:focus-visible { background: var(--htdb-red-dark) !important; border-color: var(--htdb-red-dark) !important; }
.htdb .htdb-btn-light, .htdb .htdb-btn-light:focus, .htdb .htdb-btn-light:active { background: #fff !important; color: var(--htdb-red) !important; }
.htdb .htdb-btn-light:hover { background: var(--htdb-soft) !important; color: var(--htdb-red-dark) !important; }
.htdb .htdb-back, .htdb .htdb-link, .htdb .htdb-back:hover, .htdb .htdb-link:hover, .htdb .htdb-back:focus, .htdb .htdb-link:focus { background: none !important; border: 0 !important; color: var(--htdb-red) !important; padding: 8px 0 !important; }
.htdb .htdb-pill, .htdb .htdb-time, .htdb .htdb-pill:focus, .htdb .htdb-time:focus { background: #fff !important; color: var(--htdb-ink) !important; border: 2px solid var(--htdb-line) !important; }
.htdb .htdb-pill:hover, .htdb .htdb-pill.is-on, .htdb .htdb-time:hover, .htdb .htdb-time.is-on, .htdb .htdb-pill:focus-visible, .htdb .htdb-time:focus-visible { background: var(--htdb-soft) !important; color: var(--htdb-red) !important; border-color: var(--htdb-red) !important; }

/* Tabs */
.htdb .htdb-tab, .htdb .htdb-tab:hover, .htdb .htdb-tab:focus, .htdb .htdb-tab:active { background: var(--htdb-soft) !important; color: #444 !important; border: 0 !important; border-radius: 8px !important; padding: 11px 14px !important; font: 600 15px/1.2 Inter, Arial, sans-serif !important; margin: 0 !important; }
.htdb .htdb-tab:hover { background: #efe6e6 !important; }
.htdb .htdb-tab.is-on, .htdb .htdb-tab.is-on:hover, .htdb .htdb-tab.is-on:focus { background: var(--htdb-red) !important; color: #fff !important; }
@media (max-width: 600px) {
	.htdb-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: visible; }
	.htdb .htdb-tab, .htdb .htdb-tab:hover { padding: 12px 8px !important; font-size: 14px !important; text-align: center; }
}

/* Reflective log: red header, lined up */
.htdb .htdb-reflect { padding: 0 !important; overflow: hidden; }
.htdb .htdb-reflect-head, .htdb .htdb-reflect-head:hover, .htdb .htdb-reflect-head:focus, .htdb .htdb-reflect-head:active {
	display: flex !important; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 16px; width: 100% !important; margin: 0 !important;
	background: var(--htdb-red) !important; color: #fff !important; border: 0 !important; border-radius: 0 !important; padding: 16px 22px !important;
	font: 400 16px/1.35 Inter, Arial, sans-serif !important; text-align: left !important; }
.htdb .htdb-reflect-head:hover, .htdb .htdb-reflect-head:focus-visible { background: var(--htdb-red-dark) !important; }
.htdb .htdb-reflect-head strong { font-weight: 700; }
.htdb .htdb-reflect-head .htdb-circles { flex: 0 0 auto; }
.htdb .htdb-reflect-head .htdb-circles i { border-color: #fff; background: transparent; }
.htdb .htdb-reflect-head .htdb-circles i.is-done { background: #4CAF50; border-color: #fff; }
.htdb .htdb-reflect-form { padding: 20px 22px 22px !important; margin: 0 !important; }
.htdb .htdb-reflect-form label { display: block; margin: 0 0 16px !important; padding: 0 !important; font: 600 15px/1.4 Inter, Arial, sans-serif !important; color: var(--htdb-ink) !important; }
.htdb .htdb-reflect-form textarea { display: block; width: 100% !important; max-width: 100%; margin: 6px 0 0 !important; padding: 10px 12px !important; font: 400 16px/1.45 Inter, Arial, sans-serif !important; border: 1px solid #cfc6c6 !important; border-radius: 6px !important; background: #fff !important; color: var(--htdb-ink) !important; }
@media (max-width: 600px) {
	.htdb .htdb-reflect-head, .htdb .htdb-reflect-head:hover { padding: 14px 16px !important; }
	.htdb .htdb-reflect-form { padding: 16px !important; }
}

/* Sign in */
.htdb-signin label { display: block; font-weight: 600; margin: 0 0 14px; }
.htdb-signin input[type=email] { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 400 17px Inter, Arial, sans-serif; border: 1px solid #cfc6c6; border-radius: 6px; }
.htdb-signout-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 14px; color: #666; }
.htdb-signout-row a { font-size: 14px; }
.htdb-ok-box { background: #e9f6ec; border-color: #b6e0c0; color: #0f5a2a; }

/* 1.1.3: gaps and buy lessons */
.htdb-gaps { border: 2px solid var(--htdb-red); }
.htdb-gap-list { list-style: none; margin: 0; padding: 0; }
.htdb-gap { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--htdb-line); margin: 0; }
.htdb-gap.is-hl { background: var(--htdb-soft); margin: 0 -12px; padding: 12px; border-radius: 8px; }
.htdb-gap-right { display: flex; align-items: center; gap: 12px; }
.htdb-gap-price { font-weight: 700; font-size: 18px; }
.htdb-buy-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.htdb .htdb-buy-opt, .htdb .htdb-buy-opt:focus, .htdb .htdb-buy-opt:active { display: flex !important; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; background: #fff !important; color: var(--htdb-ink) !important; border: 2px solid var(--htdb-line) !important; border-radius: 10px !important; padding: 14px 16px !important; font: 400 15px/1.35 Inter, Arial, sans-serif !important; width: 100% !important; margin: 0 !important; }
.htdb .htdb-buy-opt:hover, .htdb .htdb-buy-opt:focus-visible { border-color: var(--htdb-red) !important; background: var(--htdb-soft) !important; }
.htdb-buy-opt strong { font-size: 20px; font-family: "Bai Jamjuree", Inter, sans-serif; }
.htdb-buy-opt span { color: #666; font-size: 14px; }
.htdb-buy-opt b { margin-top: 6px; color: var(--htdb-red); font-size: 18px; }
@media (max-width: 420px) { .htdb-buy-opts { grid-template-columns: 1fr; } }

/* 1.1.4: sign-in code */
.htdb-codeform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: 0 0 8px; padding: 16px; background: var(--htdb-soft); border-radius: 8px; }
.htdb-codeform label { flex: 1 1 200px; margin: 0 !important; font-weight: 600; }
.htdb .htdb-code { display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: 700 26px/1 'Courier New', monospace !important; letter-spacing: 6px; border: 1px solid #cfc6c6; border-radius: 6px; }

/* 1.1.4: clear Buy / Book buttons and confirm step */
.htdb .htdb-buy-opt { cursor: default; }
.htdb-buy-opt em { font-style: normal; font-weight: 700; color: #0A8035; font-size: 14px; }
.htdb .htdb-buy-opt .htdb-btn { margin-top: 12px !important; width: 100% !important; text-align: center; padding: 12px 14px !important; font-size: 16px !important; }
.htdb-buy-opt { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 2px solid var(--htdb-line); border-radius: 10px; padding: 14px 16px; }
.htdb .htdb-btn.is-busy { opacity: .7; }
.htdb-confirm-step { margin-top: 16px; padding: 16px; border: 2px solid var(--htdb-red); border-radius: 10px; background: var(--htdb-soft); }
.htdb-confirm-text { margin: 0 0 12px; font-weight: 600; }
.htdb-confirm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.htdb-confirm-step .htdb-cardpanel { margin-top: 8px; }
.htdb-flash { margin-bottom: 14px; }
.htdb-gap .htdb-btn { white-space: nowrap; }

/* ===== 1.1.5 ===== */
/* Summary bar */
.htdb-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.htdb-sum { background: #fff; border: 1px solid var(--htdb-line); border-top: 4px solid var(--htdb-red); border-radius: 10px; padding: 12px 14px; }
.htdb-sum span { display: block; font-size: 13px; color: #666; font-weight: 600; }
.htdb-sum strong { display: block; font: 600 20px/1.2 "Bai Jamjuree", Inter, sans-serif; color: #000; margin-top: 2px; }
.htdb-sum strong em { display: block; font: 600 14px Inter, Arial, sans-serif; color: #444; font-style: normal; }
.htdb-sum.is-good { border-top-color: #4CAF50; } .htdb-sum.is-good strong { color: #0A8035; }
.htdb-owes-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fdeaea; border: 1px solid #f2c4c4; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-weight: 700; color: var(--htdb-red); }
.htdb-owes-bar .htdb-btn { padding: 8px 16px !important; }
.htdb-test-bar { background: #111; color: #fff; border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
@media (max-width: 600px) { .htdb-summary { grid-template-columns: 1fr 1fr; } .htdb-sum strong { font-size: 18px; } }

/* 5 tabs: 3 on top, 2 below on phones */
@media (max-width: 600px) {
	.htdb-tabs.htdb-tabs-5 { grid-template-columns: repeat(6, 1fr); }
	.htdb-tabs-5 .htdb-tab:nth-child(-n+3) { grid-column: span 2; }
	.htdb-tabs-5 .htdb-tab:nth-child(n+4) { grid-column: span 3; }
}

/* Payments tab */
.htdb-paytot { color: #444; margin: 0 0 8px; }
.htdb-payhist { list-style: none; margin: 0; padding: 0; }
.htdb-payhist li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--htdb-line); margin: 0; }
.htdb-payhist li > div:first-child span { display: block; font-size: 14px; color: #666; }
.htdb-payamt { text-align: right; white-space: nowrap; }
.htdb-payamt b, .htdb-payamt span, .htdb-payamt a { display: block; }
.htdb-payamt span { font-size: 13px; color: #666; }
.htdb-inv-unpaid { color: #b97400 !important; font-weight: 700; } .htdb-inv-overdue { color: var(--htdb-red) !important; font-weight: 700; } .htdb-inv-paid { color: #0A8035 !important; font-weight: 700; }

/* Calendar and home screen */
.htdb-cal-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.htdb-a2hs { position: relative; border: 2px solid var(--htdb-red); }
.htdb .htdb-a2hs-x, .htdb .htdb-a2hs-x:hover { position: absolute; top: 8px; right: 10px; background: none !important; border: 0 !important; color: #666 !important; font-size: 26px !important; line-height: 1 !important; padding: 4px 8px !important; }

/* Log: arrow, hint, instructor notes */
.htdb .htdb-reflect-head { padding-right: 52px !important; position: relative; }
.htdb-rgroup { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.htdb-hint { font-size: 12px; opacity: .9; }
.htdb-chev { position: absolute; right: 18px; top: 50%; width: 12px; height: 12px; border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.htdb-reflect-head[aria-expanded="true"] .htdb-chev { transform: translateY(-30%) rotate(-135deg); }
.htdb-notes { margin: 0; padding: 14px 22px; background: #fffaf0; border-bottom: 1px solid var(--htdb-line); }
.htdb-notes h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: #7a4d00; }
.htdb-notes p { margin: 0 0 6px; } .htdb-notes ul { margin: 0; padding-left: 18px; }
.htdb-up { color: #0A8035; } .htdb-down { color: var(--htdb-red); }
@media (max-width: 600px) { .htdb-rgroup { align-items: flex-start; } .htdb-notes { padding: 12px 16px; } }

/* Progress: red group headings */
.htdb .htdb-group { padding: 0 !important; overflow: hidden; }
.htdb .htdb-group-head { background: var(--htdb-red); color: #fff; padding: 14px 22px; margin: 0; }
.htdb .htdb-group-head h3 { color: #fff !important; margin: 0; }
.htdb .htdb-group .htdb-ring b { color: #000; }
.htdb .htdb-group .htdb-ring { background: conic-gradient(#4CAF50 calc(var(--pc) * 1%), #fff 0); box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.htdb .htdb-group .htdb-skills { padding: 4px 22px 14px; }
.htdb .htdb-group .htdb-skills li:first-child { border-top: 0; }

/* Tests */
.htdb-tests-form .htdb-row { display: flex; gap: 12px; flex-wrap: wrap; }
.htdb-tests-form label { flex: 1 1 180px; display: block; font-weight: 600; margin: 0 0 12px; }
.htdb-tests-form input { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: 400 16px Inter, Arial, sans-serif; border: 1px solid #cfc6c6; border-radius: 6px; }
.htdb-passed { font-weight: 700; color: #0A8035; font-size: 18px; }

/* Sign-in box: not a pupil yet */
.htdb-notyet { margin-top: 24px; padding-top: 24px; border-top: 1px solid #e3e3e3; }
.htdb-notyet p { margin: 0 0 10px; color: #777; }
.htdb a.htdb-btn-outline, .htdb a.htdb-btn-outline:hover, .htdb a.htdb-btn-outline:focus { display: inline-block; background: #fff !important; color: var(--htdb-red) !important; border: 2px solid var(--htdb-red) !important; border-radius: 5px; padding: 11px 22px; font: 600 16px Inter, Arial, sans-serif; text-decoration: none !important; }
.htdb a.htdb-btn-outline:hover { background: var(--htdb-soft) !important; }
.htdb .htdb-reflect-head, .htdb .htdb-reflect-head:hover, .htdb .htdb-reflect-head:focus, .htdb .htdb-reflect-head:active { padding-right: 54px !important; }

/* 1.1.6: waiting list */
.htdb .htdb-waitlink { margin: 18px 0 6px; font-size: 16px; }
.htdb .htdb-times { border: 0; padding: 0; margin: 0 0 18px; }
.htdb .htdb-times legend { font-weight: 700; margin-bottom: 10px; }
.htdb .htdb-trow { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--htdb-line); }
.htdb .htdb-tday { flex: 0 0 105px; font-weight: 700; padding-top: 9px; }
.htdb .htdb-tlist { display: flex; flex-wrap: wrap; gap: 8px; }
.htdb .htdb-tpick { position: relative; margin: 0; cursor: pointer; }
.htdb .htdb-tpick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.htdb .htdb-tpick span { display: inline-block; min-width: 82px; text-align: center; padding: 9px 12px; border: 2px solid var(--htdb-line); border-radius: 8px; background: #fff; font-weight: 600; font-size: 15px; }
.htdb .htdb-tpick input:checked + span { border-color: var(--htdb-red); background: var(--htdb-red); color: #fff; }
.htdb .htdb-tpick input:focus-visible + span { outline: 2px solid var(--htdb-red); outline-offset: 2px; }
.htdb .htdb-tfree { display: inline-flex; flex-direction: column; align-items: center; min-width: 82px; padding: 6px 10px; border: 2px dashed #4CAF50; border-radius: 8px; color: #2e7d32 !important; font-size: 15px; line-height: 1.2; }
.htdb .htdb-tfree small { font-size: 11px; font-weight: 600; }
.htdb .htdb-deposit { background: var(--htdb-soft); border-radius: 8px; padding: 12px 16px; margin: 8px 0 14px; }
.htdb .htdb-deposit p { margin: 0; }
.htdb .htdb-big { font-size: 30px; font-weight: 800; color: var(--htdb-red); margin: 0 0 10px; }
.htdb .htdb-signedrow { font-size: 14px; color: #666; text-align: right; }
@media (max-width: 560px) {
	.htdb .htdb-trow { flex-direction: column; gap: 6px; }
	.htdb .htdb-tday { flex: none; padding-top: 0; }
}
.htdb-form select { display: block; width: 100%; margin-top: 5px; padding: 11px 12px; font-size: 16px; font-weight: 400; border: 1px solid #cfc6c6; border-radius: 6px; background: #fff; color: var(--htdb-ink); font-family: inherit; height: auto; }
.htdb-form select:focus { border-color: var(--htdb-red); outline: 2px solid rgba(157,0,0,.15); }
@media (max-width: 560px) {
	.htdb .htdb-tlist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
	.htdb .htdb-tpick span, .htdb .htdb-tfree { min-width: 0; width: 100%; padding: 9px 4px; font-size: 14px; }
}

/* 1.1.9: message your instructor */
.htdb .htdb-message textarea { min-height: 110px; resize: vertical; }
.htdb .htdb-message .htdb-small { margin-top: -4px; }
.htdb .htdb-msg-ok { background: #e8f5e9; color: #1b5e20; border-radius: 6px; padding: 10px 14px; font-weight: 600; margin: 8px 0; }
.htdb .htdb-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* 1.2.0: Buy buttons line up at the bottom of both boxes */
.htdb .htdb-buy-opts { align-items: stretch; }
.htdb .htdb-buy-opt .htdb-btn { margin-top: auto !important; }
.htdb .htdb-buy-opt em, .htdb .htdb-buy-opt .htdb-buy-gap { display: block; min-height: 20px; margin-bottom: 12px; }

/* 1.2.3 Notifications */
.htdb .htdb-notes h2 { display: flex; align-items: center; gap: 10px; }
.htdb .htdb-notes-n { background: #9D0000; color: #fff; font-size: 13px; font-weight: 700; border-radius: 20px; padding: 2px 10px; }
.htdb .htdb-notes-list { list-style: none; margin: 0; padding: 0; }
.htdb .htdb-notes-list li { border-top: 1px solid #eee; padding: 12px 0 12px 12px; border-left: 4px solid transparent; }
.htdb .htdb-notes-list li:first-child { border-top: 0; }
.htdb .htdb-notes-list li.is-new { border-left-color: #9D0000; background: #fff7f7; }
.htdb .htdb-notes-h { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.htdb .htdb-notes-h small { color: #6b7080; }
.htdb .htdb-notes-list p { margin: 6px 0 0; }
.htdb .htdb-notes-link { display: inline-block; margin-top: 6px; color: #9D0000; font-weight: 700; text-decoration: none; }
.htdb .htdb-notes-more { margin-top: 6px; }

/* 1.2.4: instructor choice, terms agreement and the once-only welcome */
.htdb .htdb-instpick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.htdb .htdb-instpick > span { font-weight: 600; margin-right: 4px; }
.htdb .htdb-ipill { background: #fff !important; color: var(--htdb-ink) !important; border: 2px solid var(--htdb-line) !important; border-radius: 20px !important; padding: 7px 16px !important; font-size: 15px !important; font-weight: 600 !important; line-height: 1.2 !important; cursor: pointer; }
.htdb .htdb-ipill.is-on, .htdb .htdb-ipill:hover, .htdb .htdb-ipill:focus-visible { border-color: var(--htdb-red) !important; background: var(--htdb-soft) !important; color: var(--htdb-red) !important; outline: none; }
.htdb .htdb-terms h2 { margin-top: 0; }
.htdb .htdb-terms-link { display: inline-block; font-size: 17px; text-decoration: underline !important; }
.htdb .htdb-terms .htdb-actions { margin-top: 14px; }
.htdb .htdb-welcome { border-left: 5px solid var(--htdb-red); }
.htdb .htdb-welcome h2 { margin-top: 0; }
.htdb .htdb-welcome p { margin: 0 0 12px; line-height: 1.55; }
.htdb .htdb-welcome p:last-child { margin-bottom: 0; }

/* 1.2.5: lessons laid out like Total Drive */
.htdb .htdb-ltotals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; background: #f3f5f8; border-radius: 10px; padding: 14px 10px; margin: 16px 0; }
.htdb .htdb-ltotals div { text-align: left; padding: 0 6px; }
.htdb .htdb-ltotals strong { display: block; font-size: 22px; font-weight: 500; line-height: 1.2; color: var(--htdb-ink); }
.htdb .htdb-ltotals span { display: block; font-size: 15px; color: #6b6b6b; }
.htdb .htdb-lswitch { display: grid; grid-template-columns: 1fr 1fr; background: #f3f5f8; border-radius: 30px; padding: 4px; margin: 0 0 8px; }
.htdb .htdb-lswitch button { background: transparent !important; color: var(--htdb-ink) !important; border: 0 !important; border-radius: 26px !important; padding: 11px 8px !important; font-size: 16px !important; font-weight: 600 !important; line-height: 1.2 !important; cursor: pointer; box-shadow: none !important; }
.htdb .htdb-lswitch button.is-on { background: var(--htdb-red) !important; color: #fff !important; }
.htdb .htdb-lrows { list-style: none; margin: 0; padding: 0; border-top: 0; }
.htdb .htdb-lrow { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--htdb-line); margin: 0; }
.htdb .htdb-lrow-empty { color: #777; display: block; }
.htdb .htdb-lhrs { flex: 0 0 64px; border-radius: 8px; overflow: hidden; text-align: center; background: #f3f5f8; }
.htdb .htdb-lhrs b { display: block; font-size: 22px; font-weight: 500; padding: 7px 0 5px; color: var(--htdb-ink); }
.htdb .htdb-lhrs span { display: block; background: var(--htdb-red); color: #fff; font-size: 13px; font-weight: 600; padding: 4px 0; }
.htdb .htdb-lmain { flex: 1; min-width: 0; }
.htdb .htdb-lwhen { font-size: 18px; line-height: 1.3; }
.htdb .htdb-lwhen strong { font-weight: 700; }
.htdb .htdb-ltest { font-size: 14px; font-weight: 600; color: var(--htdb-red); margin-left: 4px; }
.htdb .htdb-lpills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.htdb .htdb-lpill { display: inline-block; border-radius: 20px; padding: 4px 12px; font-size: 14px; font-weight: 600; line-height: 1.3; background: #eef1f5; color: var(--htdb-ink); }
.htdb .htdb-lpill.is-orange { background: #f28c1c; color: #fff; }
.htdb .htdb-lpill.is-amber { background: #fdf0d5; color: #8a5a00; }
.htdb .htdb-lpill.is-green { background: #3e9b3e; color: #fff; }
.htdb .htdb-lpill.is-red { background: #c62828; color: #fff; }
.htdb .htdb-lpill.is-grey { background: #e3e3e3; color: #555; }
.htdb .htdb-lpill.is-type { background: #eef1f5; color: var(--htdb-ink); }
.htdb .htdb-lrow.is-skipped_pupil .htdb-lwhen, .htdb .htdb-lrow.is-skipped_instructor .htdb-lwhen, .htdb .htdb-lrow.is-cancelled .htdb-lwhen { color: #999; text-decoration: line-through; }
@media (max-width: 600px) {
	.htdb .htdb-ltotals { grid-template-columns: repeat(2, 1fr); row-gap: 12px; }
	.htdb .htdb-lwhen { font-size: 16px; }
	.htdb .htdb-lhrs { flex-basis: 56px; }
}

/* 1.2.6: on computers and tablets each lesson row uses the full width, labels on the right */
@media (min-width: 601px) {
	.htdb .htdb-lrow { gap: 22px; padding: 16px 4px; }
	.htdb .htdb-lhrs { flex-basis: 72px; }
	.htdb .htdb-lmain { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
	.htdb .htdb-lwhen { font-size: 19px; }
	.htdb .htdb-lpills { margin-top: 0; justify-content: flex-end; flex-wrap: nowrap; }
	.htdb .htdb-lpill { white-space: nowrap; }
}

/* 1.2.7: Future / Past / View all logs, numbered circles */
.htdb .htdb-rswitch { margin: 16px 0 0; }
.htdb .htdb-3 { grid-template-columns: 1fr 1fr 1fr; }
.htdb .htdb-reflect-head .htdb-ncircles { gap: 6px; }
.htdb .htdb-reflect-head .htdb-ncircles i { width: 26px; height: 26px; border: 2px solid #fff; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 13px; font-weight: 600; color: #fff; line-height: 1; }
.htdb .htdb-reflect-head .htdb-ncircles i.is-done { background: #4CAF50; border-color: #4CAF50; }
@media (max-width: 600px) { .htdb .htdb-reflect-head .htdb-ncircles i { width: 24px; height: 24px; font-size: 12px; } .htdb .htdb-lswitch button { font-size: 14px !important; padding: 10px 4px !important; } }

/* 1.3.3: reflective log boxes grow to fit */
.htdb textarea[name^="answers["] { overflow: hidden !important; resize: vertical; }
