/* TET Marker: navy and gold, mobile first. Everything is scoped under .tetm-app
   with enough specificity to survive Elementor kit and theme styles. */

.tetm-app {
	--tetm-navy: #0f2747;
	--tetm-navy-2: #1b3a66;
	--tetm-navy-soft: #e8edf5;
	--tetm-gold: #c9a227;
	--tetm-gold-dark: #8a6d0f;
	--tetm-gold-soft: #faf4e1;
	--tetm-ink: #1d2433;
	--tetm-muted: #5b6475;
	--tetm-line: #dde2ea;
	--tetm-bg: #f5f6f9;
	--tetm-card: #ffffff;
	--tetm-good: #1c7c4a;
	--tetm-good-soft: #e7f5ed;
	--tetm-bad: #b3261e;
	--tetm-bad-soft: #fdecea;
	--tetm-radius: 12px;
	--tetm-focus: 0 0 0 3px rgba(201, 162, 39, 0.55);

	box-sizing: border-box;
	width: 100%;
	color: var(--tetm-ink);
	font-size: 16px;
	line-height: 1.55;
	text-align: left;
}

.tetm-app *,
.tetm-app *::before,
.tetm-app *::after {
	box-sizing: border-box;
}

.tetm-app .tetm-inner {
	max-width: 860px;
	margin: 0 auto;
	padding: 16px 12px 40px;
}

/* ---------------------------------------------------------------- Type */

.tetm-app.tetm-app h2,
.tetm-app.tetm-app h3,
.tetm-app.tetm-app h4 {
	/* Doubled class: beats ".elementor-kit-N h2" without beating our own class rules. */
	font-family: inherit;
	color: var(--tetm-navy);
	letter-spacing: normal;
	text-transform: none;
	line-height: 1.25;
}
.tetm-app h2,
.tetm-app h3,
.tetm-app h4 { margin: 0 0 8px; }
.tetm-app .tetm-h2 { font-size: 1.4rem; font-weight: 700; }
.tetm-app .tetm-h3 { font-size: 1.15rem; font-weight: 700; }
.tetm-app .tetm-h4 { font-size: 1rem; font-weight: 700; margin: 0 0 6px; }
.tetm-app p { margin: 0 0 10px; }
.tetm-app p:last-child { margin-bottom: 0; }
.tetm-app .tetm-muted { color: var(--tetm-muted); font-size: 0.93rem; }
.tetm-app .tetm-sr {
	position: absolute !important;
	width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- Hero */

.tetm-app .tetm-hero {
	background: var(--tetm-navy);
	background-image: linear-gradient(135deg, var(--tetm-navy) 0%, var(--tetm-navy-2) 100%);
	color: #fff;
	border-radius: var(--tetm-radius);
	padding: 22px 18px;
	margin-bottom: 16px;
	border-bottom: 4px solid var(--tetm-gold);
}
.tetm-app .tetm-hero .tetm-title {
	color: #fff;
	font-size: 1.6rem;
	font-weight: 800;
	margin: 0 0 8px;
}
.tetm-app .tetm-hero .tetm-lede { color: #dfe6f2; margin: 0 0 12px; }
.tetm-app .tetm-hero .tetm-spec-note {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
	border-left: 3px solid var(--tetm-gold);
	border-radius: 4px;
	font-size: 0.92rem;
	margin: 0 0 12px;
	padding: 8px 12px;
}
.tetm-app .tetm-extract {
	border-top: 1px solid rgba(15, 39, 71, 0.12);
	margin-top: 18px;
	padding-top: 14px;
}
.tetm-app .tetm-eyebrow {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tetm-gold);
	margin: 0 0 6px;
}
.tetm-app .tetm-remaining {
	display: inline-block;
	background: var(--tetm-gold);
	color: var(--tetm-navy);
	font-weight: 700;
	font-size: 0.9rem;
	border-radius: 14px;
	padding: 4px 12px;
	margin: 0;
}
.tetm-app .tetm-remaining:empty { display: none; }

/* Credits (v2.2): balance in the hero, buy prompt above the send button, "used · left" on the report. */
.tetm-app .tetm-balance-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.tetm-app.tetm-app a.tetm-buy-link { color: #fff; font-weight: 700; font-size: 0.9rem; text-decoration: underline; text-decoration-color: var(--tetm-gold); text-underline-offset: 3px; }
.tetm-app.tetm-app a.tetm-buy-link:hover { color: var(--tetm-gold); }
.tetm-app .tetm-buy {
	background: var(--tetm-gold-soft);
	border: 1px solid #e5d08f;
	border-left: 4px solid var(--tetm-gold);
	border-radius: 8px;
	padding: 12px 14px;
	margin: 0 0 14px;
}
.tetm-app .tetm-buy-text { margin: 0 0 10px; font-weight: 600; color: var(--tetm-navy); }
.tetm-app .tetm-buy-actions { margin: 0; }
.tetm-app.tetm-app a.tetm-btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.tetm-app .tetm-credits-used {
	display: inline-block;
	background: var(--tetm-navy-soft);
	color: var(--tetm-navy);
	font-weight: 700;
	font-size: 0.9rem;
	border-radius: 999px;
	padding: 4px 12px;
	margin: 0 0 12px;
}
.tetm-app [hidden] { display: none !important; }

/* Beta courses (v2): a small pill in the hero and beside the mark, plus a note. */
.tetm-app .tetm-beta-pill {
	display: inline-block;
	vertical-align: middle;
	background: var(--tetm-gold-soft);
	color: var(--tetm-gold-dark);
	border: 1px solid var(--tetm-gold);
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
	padding: 1px 8px;
	text-transform: uppercase;
	white-space: nowrap;
}
.tetm-app .tetm-hero .tetm-beta-pill { background: var(--tetm-gold); color: var(--tetm-navy); border-color: var(--tetm-gold); margin-left: 4px; }
.tetm-app .tetm-markline .tetm-beta-pill { font-size: 0.75rem; margin-left: 10px; position: relative; top: -0.2em; }
.tetm-app .tetm-hero .tetm-beta-note {
	color: #f3e7bd;
	font-size: 0.9rem;
	margin: -4px 0 12px;
}

.tetm-app .tetm-banner {
	background: var(--tetm-gold-soft);
	border: 1px solid var(--tetm-gold);
	color: var(--tetm-gold-dark);
	border-radius: 8px;
	padding: 10px 14px;
	font-weight: 600;
	margin: 0 0 16px;
}

/* ---------------------------------------------------------------- Cards and steps */

.tetm-app .tetm-card {
	background: var(--tetm-card);
	border: 1px solid var(--tetm-line);
	border-radius: var(--tetm-radius);
	padding: 18px 16px;
	margin: 0 0 16px;
	box-shadow: 0 1px 2px rgba(15, 39, 71, 0.05);
}
.tetm-app .tetm-notice { border-left: 4px solid var(--tetm-gold); }
.tetm-app .tetm-loading { color: var(--tetm-muted); }

.tetm-app .tetm-step-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 1.2rem;
	font-weight: 800;
	margin: 0 0 14px;
}
.tetm-app .tetm-step-num {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--tetm-navy);
	color: var(--tetm-gold);
	font-size: 0.95rem;
	font-weight: 800;
}

.tetm-app .tetm-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0 12px; }
.tetm-app .tetm-field { margin: 0 0 14px; min-width: 0; }
.tetm-app .tetm-label {
	display: block;
	font-weight: 700;
	color: var(--tetm-navy);
	margin: 0 0 4px;
	font-size: 0.97rem;
}
.tetm-app .tetm-hint { color: var(--tetm-muted); font-size: 0.9rem; margin: 0 0 6px; }
.tetm-app .tetm-course-field .tetm-select { font-weight: 600; }
.tetm-app .tetm-course-note { color: var(--tetm-muted); font-size: 0.88rem; margin: 6px 0 0; }

/* ---------------------------------------------------------------- Controls */

.tetm-app .tetm-select,
.tetm-app .tetm-input,
.tetm-app .tetm-textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	font: inherit;
	font-size: 16px; /* stops iOS zooming on focus */
	color: var(--tetm-ink);
	background: #fff;
	border: 1.5px solid #c3cad6;
	border-radius: 8px;
	padding: 10px 12px;
	margin: 0;
	box-shadow: none;
	line-height: 1.45;
	min-height: 46px;
}
.tetm-app .tetm-select {
	appearance: none;
	-webkit-appearance: none;
	background-image: linear-gradient(45deg, transparent 50%, var(--tetm-navy) 50%), linear-gradient(135deg, var(--tetm-navy) 50%, transparent 50%);
	background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 34px;
}
.tetm-app .tetm-textarea { resize: vertical; min-height: 90px; }
.tetm-app .tetm-select:focus,
.tetm-app .tetm-input:focus,
.tetm-app .tetm-textarea:focus {
	outline: none;
	border-color: var(--tetm-navy);
	box-shadow: var(--tetm-focus);
}
.tetm-app [aria-invalid="true"] { border-color: var(--tetm-bad) !important; }

.tetm-app .tetm-file {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden; opacity: 0;
	clip: rect(0, 0, 0, 0);
}

/* Buttons: selectors are doubled up to beat ".elementor-kit-N button". */
.tetm-app .tetm-btn,
.tetm-app button.tetm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 46px;
	padding: 10px 18px;
	border-radius: 8px;
	border: 2px solid transparent;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
	white-space: normal;
	text-align: center;
}
.tetm-app .tetm-btn:focus-visible,
.tetm-app .tetm-icon-btn:focus-visible,
.tetm-app .tetm-link-btn:focus-visible,
.tetm-app .tetm-summary:focus-visible,
.tetm-app .tetm-check:focus-visible {
	outline: none;
	box-shadow: var(--tetm-focus);
}
.tetm-app .tetm-btn-primary,
.tetm-app button.tetm-btn-primary {
	background: var(--tetm-navy);
	color: #fff;
	border-color: var(--tetm-navy);
}
.tetm-app .tetm-btn-primary:hover:not(:disabled),
.tetm-app button.tetm-btn-primary:hover:not(:disabled) {
	background: var(--tetm-navy-2);
	border-color: var(--tetm-gold);
	color: #fff;
}
.tetm-app .tetm-btn-secondary,
.tetm-app button.tetm-btn-secondary {
	background: var(--tetm-gold);
	color: var(--tetm-navy);
	border-color: var(--tetm-gold);
}
.tetm-app .tetm-btn-secondary:hover:not(:disabled),
.tetm-app button.tetm-btn-secondary:hover:not(:disabled) {
	background: #b8911c;
	border-color: #b8911c;
	color: var(--tetm-navy);
}
.tetm-app .tetm-btn-ghost,
.tetm-app button.tetm-btn-ghost {
	background: #fff;
	color: var(--tetm-navy);
	border: 2px dashed #9fb0c9;
	font-weight: 600;
}
.tetm-app .tetm-btn-ghost:hover:not(:disabled),
.tetm-app button.tetm-btn-ghost:hover:not(:disabled) {
	background: var(--tetm-navy-soft);
	border-color: var(--tetm-navy);
	color: var(--tetm-navy);
}
.tetm-app button:disabled,
.tetm-app .tetm-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}
.tetm-app .tetm-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tetm-app .tetm-btn-row .tetm-btn { flex: 1 1 auto; }

.tetm-app .tetm-icon-btn,
.tetm-app button.tetm-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	padding: 0;
	border: 1.5px solid #c3cad6;
	border-radius: 8px;
	background: #fff;
	color: var(--tetm-navy);
	font: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}
.tetm-app .tetm-icon-btn:hover:not(:disabled) { background: var(--tetm-navy-soft); border-color: var(--tetm-navy); color: var(--tetm-navy); }
.tetm-app .tetm-icon-btn.tetm-remove { color: var(--tetm-bad); }
.tetm-app .tetm-icon-btn.tetm-remove:hover:not(:disabled) { background: var(--tetm-bad-soft); border-color: var(--tetm-bad); color: var(--tetm-bad); }

.tetm-app .tetm-link-btn,
.tetm-app button.tetm-link-btn {
	background: none;
	border: 0;
	padding: 8px 4px;
	min-height: 0;
	color: var(--tetm-navy);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-transform: none;
	letter-spacing: normal;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	box-shadow: none;
}
.tetm-app .tetm-link-btn:hover { color: var(--tetm-gold-dark); background: none; }

/* ---------------------------------------------------------------- Details (optional sections) */

.tetm-app .tetm-details {
	border: 1px solid var(--tetm-line);
	border-radius: 8px;
	margin: 0 0 10px;
	background: #fbfbfd;
}
.tetm-app .tetm-summary {
	cursor: pointer;
	padding: 12px 14px;
	font-weight: 700;
	color: var(--tetm-navy);
	list-style: none;
	display: flex;
	align-items: center;
	gap: 8px;
	border-radius: 8px;
}
.tetm-app .tetm-summary::-webkit-details-marker { display: none; }
.tetm-app .tetm-summary::before {
	content: "+";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--tetm-navy-soft);
	color: var(--tetm-navy);
	font-weight: 800;
	flex: 0 0 auto;
}
.tetm-app .tetm-details[open] > .tetm-summary::before { content: "−"; }
.tetm-app .tetm-details-body { padding: 4px 14px 14px; }

/* ---------------------------------------------------------------- Photos */

.tetm-app .tetm-photos { margin: 0 0 14px; }
.tetm-app .tetm-drop {
	border: 2px dashed rgba(15, 39, 71, 0.25);
	border-radius: 10px;
	padding: 12px 14px;
	transition: background 0.15s, border-color 0.15s;
}
.tetm-app .tetm-drop-text { color: #55627a; font-size: 0.9rem; margin: 0 0 10px; }
.tetm-app .tetm-drop .tetm-btn-row { margin: 0; }
.tetm-app .tetm-drop.tetm-drop-over { background: #fbf6e6; border-color: var(--tetm-gold); }
@media (hover: none) and (pointer: coarse) {
	.tetm-app .tetm-drop { border: 0; padding: 0; }
	.tetm-app .tetm-drop-text { display: none; }
}
.tetm-app .tetm-photo-note { color: var(--tetm-bad); font-size: 0.92rem; margin: 8px 0 0; }
.tetm-app .tetm-photo-note:empty { display: none; }
.tetm-app .tetm-thumbs {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
	gap: 8px;
}
.tetm-app .tetm-thumbs:empty { display: none; }
.tetm-app .tetm-thumb {
	display: flex;
	min-width: 0;
	align-items: center;
	gap: 8px;
	padding: 8px;
	margin: 0;
	border: 1px solid var(--tetm-line);
	border-radius: 8px;
	background: #fff;
}
.tetm-app .tetm-thumb-img {
	flex: 0 0 auto;
	width: 48px;
	height: 64px;
	object-fit: contain;
	border-radius: 4px;
	border: 1px solid var(--tetm-line);
	background: var(--tetm-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: none;
}
.tetm-app .tetm-thumb-meta { flex: 1 1 auto; min-width: 4.2em; display: flex; flex-direction: column; }
.tetm-app .tetm-thumb-label { font-weight: 700; color: var(--tetm-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tetm-app .tetm-thumb-size { color: var(--tetm-muted); font-size: 0.85rem; }
.tetm-app .tetm-thumb-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.tetm-app .tetm-thumb-actions .tetm-icon-btn { width: 38px; height: 38px; }

.tetm-app .tetm-pdf-row { margin: 0 0 10px; }
.tetm-app .tetm-pdf {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border: 1px solid var(--tetm-line);
	border-radius: 8px;
}
.tetm-app .tetm-pdf[hidden] { display: none; }
.tetm-app .tetm-pdf-icon {
	flex: 0 0 auto;
	background: var(--tetm-bad);
	color: #fff;
	font-weight: 800;
	font-size: 0.75rem;
	border-radius: 4px;
	padding: 8px 6px;
}
.tetm-app .tetm-pdf-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Step 3 */

.tetm-app .tetm-dl { margin: 0 0 14px; padding: 0; }
.tetm-app .tetm-dl-row {
	display: grid;
	grid-template-columns: minmax(6.5em, 38%) 1fr;
	gap: 8px;
	padding: 7px 0;
	border-bottom: 1px solid var(--tetm-line);
}
.tetm-app .tetm-dl dt { font-weight: 700; color: var(--tetm-navy); margin: 0; }
.tetm-app .tetm-dl dd { margin: 0; color: var(--tetm-ink); }

.tetm-app .tetm-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: var(--tetm-gold-soft);
	border: 1px solid #ecdcaa;
	border-radius: 8px;
	padding: 12px;
	margin: 0 0 14px;
}
.tetm-app .tetm-consent label { font-size: 0.95rem; cursor: pointer; margin: 0; font-weight: 500; }
.tetm-app .tetm-check {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: 2px 0 0;
	accent-color: var(--tetm-navy);
	cursor: pointer;
}

.tetm-app .tetm-error {
	background: var(--tetm-bad-soft);
	border: 1px solid #f3b8b3;
	border-left: 4px solid var(--tetm-bad);
	color: #7a1a14;
	border-radius: 8px;
	padding: 12px 14px;
	margin: 0 0 14px;
	font-weight: 600;
}
.tetm-app .tetm-error[hidden] { display: none; }

.tetm-app .tetm-send-row { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.tetm-app .tetm-send { width: 100%; font-size: 1.1rem; min-height: 52px; }
.tetm-app .tetm-send-note { color: var(--tetm-muted); font-size: 0.93rem; text-align: center; margin: 0; }

.tetm-app .tetm-form[hidden],
.tetm-app .tetm-progress[hidden],
.tetm-app .tetm-report[hidden] { display: none; }
.tetm-app .tetm-dimmed { opacity: 0.55; }

/* ---------------------------------------------------------------- Progress */

.tetm-app .tetm-progress { text-align: center; padding: 28px 16px; border-top: 4px solid var(--tetm-gold); }
.tetm-app .tetm-spinner {
	width: 44px;
	height: 44px;
	margin: 0 auto 14px;
	border-radius: 50%;
	border: 4px solid var(--tetm-navy-soft);
	border-top-color: var(--tetm-gold);
	animation: tetm-spin 0.9s linear infinite;
}
.tetm-app .tetm-mini-spinner {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 3px solid var(--tetm-navy-soft);
	border-top-color: var(--tetm-gold);
	animation: tetm-spin 0.9s linear infinite;
}
.tetm-app .tetm-elapsed { color: var(--tetm-muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
@keyframes tetm-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.tetm-app .tetm-spinner,
	.tetm-app .tetm-mini-spinner { animation-duration: 3s; }
}

/* ---------------------------------------------------------------- Report */

.tetm-app .tetm-report:focus { outline: none; }
.tetm-app .tetm-markcard {
	border-top: 5px solid var(--tetm-gold);
	padding-top: 20px;
}
.tetm-app .tetm-markline {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--tetm-navy);
	margin: 0 0 4px;
}
.tetm-app .tetm-mark {
	font-size: 2.6rem;
	font-weight: 800;
	color: var(--tetm-navy);
	line-height: 1;
}
.tetm-app .tetm-max { font-weight: 800; }
.tetm-app .tetm-range { color: var(--tetm-muted); font-weight: 600; margin: 0 0 10px; }
.tetm-app .tetm-recognised {
	font-size: 0.88rem;
	color: var(--tetm-good);
	background: var(--tetm-good-soft);
	border-radius: 6px;
	padding: 6px 10px;
	margin: 0 0 12px;
	line-height: 1.4;
}
.tetm-app .tetm-bar {
	position: relative;
	height: 12px;
	border-radius: 999px;
	background: var(--tetm-navy-soft);
	overflow: hidden;
	margin: 0 0 14px;
}
.tetm-app .tetm-bar-fill {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: var(--tetm-navy);
	border-radius: 999px;
}
.tetm-app .tetm-bar-range {
	position: absolute;
	top: 0;
	bottom: 0;
	background: var(--tetm-gold);
	opacity: 0.6;
}
.tetm-app .tetm-qsum { color: var(--tetm-muted); font-size: 0.95rem; }
.tetm-app .tetm-qsum strong { color: var(--tetm-navy); }

.tetm-app .tetm-strands { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.tetm-app .tetm-strand {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-areas: "name pips" "meta meta";
	align-items: center;
	gap: 4px 10px;
	margin: 0;
	padding: 10px 12px;
	background: var(--tetm-navy-soft);
	border-radius: 8px;
}
.tetm-app .tetm-strand-name { grid-area: name; font-weight: 700; color: var(--tetm-navy); }
.tetm-app .tetm-strand-meta { grid-area: meta; color: var(--tetm-ink); font-size: 0.93rem; }
.tetm-app .tetm-pips { grid-area: pips; display: inline-flex; gap: 4px; }
.tetm-app .tetm-pip { width: 14px; height: 14px; border-radius: 3px; background: #fff; border: 1.5px solid var(--tetm-navy-2); }
.tetm-app .tetm-pip-on { background: var(--tetm-gold); border-color: var(--tetm-gold-dark); }

.tetm-app .tetm-headline {
	font-size: 1.05rem;
	border-left: 4px solid var(--tetm-gold);
	padding: 4px 0 4px 12px;
	margin: 12px 0 0;
}

.tetm-app .tetm-list { margin: 0; padding: 0 0 0 1.3em; }
.tetm-app .tetm-list li { margin: 0 0 8px; padding-left: 2px; }
.tetm-app .tetm-good { list-style: none; padding: 0; }
.tetm-app .tetm-good li { position: relative; padding-left: 28px; }
.tetm-app .tetm-good li::before {
	content: "✓";
	position: absolute;
	left: 0;
	top: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--tetm-good-soft);
	color: var(--tetm-good);
	font-weight: 800;
	font-size: 0.8rem;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
}
.tetm-app .tetm-sec-fixes { background: var(--tetm-gold-soft); border-color: #ecdcaa; }
.tetm-app .tetm-fixes { counter-reset: tetm-fix; list-style: none; padding: 0; }
.tetm-app .tetm-fixes li { counter-increment: tetm-fix; position: relative; padding-left: 38px; font-weight: 600; min-height: 28px; }
.tetm-app .tetm-fixes li::before {
	content: counter(tetm-fix);
	position: absolute;
	left: 0;
	top: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--tetm-navy);
	color: var(--tetm-gold);
	font-weight: 800;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tetm-app .tetm-paras,
.tetm-app .tetm-faults { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tetm-app .tetm-para,
.tetm-app .tetm-fault {
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--tetm-line);
	border-radius: 8px;
	background: #fcfcfe;
}
.tetm-app .tetm-quote {
	margin: 0 0 8px;
	padding: 6px 12px;
	border-left: 3px solid var(--tetm-navy-2);
	background: var(--tetm-navy-soft);
	color: var(--tetm-navy);
	font-style: italic;
	font-size: 0.97rem;
	border-radius: 0 6px 6px 0;
	quotes: none;
}
.tetm-app .tetm-quote::before,
.tetm-app .tetm-quote::after { content: none; }
.tetm-app .tetm-fault-part { margin: 0 0 8px; }
.tetm-app .tetm-fault-part:last-child { margin-bottom: 0; }
.tetm-app .tetm-fault-k {
	display: block;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--tetm-muted);
	margin: 0 0 4px;
}
.tetm-app .tetm-fault-fix {
	background: var(--tetm-good-soft);
	border-radius: 6px;
	padding: 8px 10px;
}
.tetm-app .tetm-fault-fix .tetm-fault-k { color: var(--tetm-good); }

.tetm-app .tetm-rewrites { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tetm-app .tetm-rewrite {
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--tetm-line);
	border-left: 4px solid var(--tetm-gold);
	border-radius: 8px;
	background: #fcfcfe;
	break-inside: avoid;
}
.tetm-app .tetm-rw-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 10px;
	margin: 0 0 10px;
}
.tetm-app .tetm-rw-head .tetm-h4 { margin: 0; }
.tetm-app .tetm-lift {
	display: inline-block;
	background: var(--tetm-gold);
	color: var(--tetm-navy);
	font-weight: 800;
	font-size: 0.82rem;
	line-height: 1.3;
	border-radius: 999px;
	padding: 3px 10px;
}
.tetm-app .tetm-rw-orig,
.tetm-app .tetm-rw-text { white-space: pre-line; overflow-wrap: anywhere; }
.tetm-app .tetm-rw-new {
	background: #fff;
	border: 1px solid #ecdcaa;
	border-radius: 6px;
	padding: 8px 10px;
}
.tetm-app .tetm-rw-new .tetm-fault-k { color: var(--tetm-gold-dark); }
.tetm-app .tetm-rw-text { margin: 0; line-height: 1.7; }
.tetm-app mark.tetm-added,
.tetm-app .tetm-legend-swatch {
	background: #fbecc0;
	color: var(--tetm-ink);
	border-radius: 2px;
	box-shadow: inset 0 -2px 0 #e3c46a;
	padding: 1px 1px;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}
.tetm-app .tetm-rw-legend { font-size: 0.85rem; color: var(--tetm-muted); margin: 0 0 6px; }
.tetm-app .tetm-legend-swatch { font-weight: 600; padding: 0 3px; }
.tetm-app .tetm-rw-why p { margin: 0; }

.tetm-app .tetm-others { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tetm-app .tetm-other {
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--tetm-line);
	border-left: 4px solid var(--tetm-navy-2);
	border-radius: 8px;
	background: #fcfcfe;
	break-inside: avoid;
}
.tetm-app .tetm-other-evaluation { border-left-color: var(--tetm-gold); }
.tetm-app .tetm-other-judgement { border-left-color: var(--tetm-good); }
.tetm-app .tetm-other-application { border-left-color: #6b52a3; }
.tetm-app .tetm-kind {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	border: 1px solid;
	border-radius: 999px;
	padding: 2px 9px;
	margin: 0 0 6px;
}
.tetm-app .tetm-kind-analysis { background: var(--tetm-navy-soft); color: var(--tetm-navy); border-color: #c3cde0; }
.tetm-app .tetm-kind-evaluation { background: var(--tetm-gold-soft); color: #6b5409; border-color: #e5d08f; }
.tetm-app .tetm-kind-judgement { background: var(--tetm-good-soft); color: #155e38; border-color: #b4dcc4; }
.tetm-app .tetm-kind-application { background: #f1ecf8; color: #4a3478; border-color: #d6c9ec; }
.tetm-app .tetm-other-point { font-weight: 700; color: var(--tetm-navy); margin: 0 0 8px; }
.tetm-app .tetm-chain {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 4px;
	margin: 0 0 8px;
}
.tetm-app .tetm-chain-step {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	max-width: 100%;
	min-width: 0;
}
.tetm-app .tetm-chip {
	flex: 0 1 auto;
	min-width: 0;
	max-width: 100%;
	background: #fff;
	border: 1px solid #cfd6e2;
	border-radius: 6px;
	padding: 3px 8px;
	font-size: 0.92rem;
	line-height: 1.35;
	overflow-wrap: anywhere;
}
.tetm-app .tetm-arrow { flex: 0 0 auto; color: var(--tetm-gold-dark); font-weight: 800; font-size: 1.05rem; line-height: 1; }
.tetm-app .tetm-chain-plain { font-size: 0.95rem; margin: 0 0 8px; }
.tetm-app .tetm-other-why { font-size: 0.93rem; color: var(--tetm-ink); margin: 0; }
.tetm-app .tetm-other-why strong { color: var(--tetm-navy); }

/* Points table: stacked cards on phones, a table on wider screens. */
.tetm-app .tetm-points { width: 100%; border-collapse: collapse; margin: 0; font-size: 0.95rem; border: 0; }
.tetm-app .tetm-points thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.tetm-app .tetm-points tr {
	display: block;
	border: 1px solid var(--tetm-line);
	border-left-width: 4px;
	border-radius: 8px;
	margin: 0 0 10px;
	padding: 8px 12px;
	background: #fff;
}
.tetm-app .tetm-points tr.tetm-pt-yes { border-left-color: var(--tetm-good); }
.tetm-app .tetm-points tr.tetm-pt-no { border-left-color: var(--tetm-bad); }
.tetm-app .tetm-points td {
	display: grid;
	grid-template-columns: 6.5em 1fr;
	gap: 8px;
	padding: 4px 0;
	border: 0;
	background: none;
	text-align: left;
	vertical-align: top;
}
.tetm-app .tetm-points td::before {
	content: attr(data-label);
	font-style: normal;
	font-weight: 700;
	color: var(--tetm-muted);
	font-size: 0.85rem;
}
.tetm-app .tetm-pt-type {
	font-weight: 800;
	color: var(--tetm-navy);
	text-decoration: none;
	border: 0;
}
.tetm-app .tetm-pt-typename { color: var(--tetm-muted); }
.tetm-app .tetm-pt-badge { font-weight: 800; }
.tetm-app .tetm-pt-yes .tetm-pt-badge { color: var(--tetm-good); }
.tetm-app .tetm-pt-no .tetm-pt-badge { color: var(--tetm-bad); }
.tetm-app .tetm-pt-quote { font-style: italic; }

.tetm-app .tetm-sec-read { background: #fbfbfd; }
.tetm-app .tetm-refused { border-top: 5px solid var(--tetm-gold); }

.tetm-app .tetm-disclaimer {
	text-align: center;
	color: var(--tetm-muted);
	font-size: 0.88rem;
	margin: 8px 0 16px;
	padding: 0 8px;
}
.tetm-app .tetm-disclaimer-main { font-weight: 700; color: var(--tetm-navy); font-size: 0.95rem; }

.tetm-app .tetm-report-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: stretch;
}

/* ---------------------------------------------------------------- Locked view */

.tetm-app .tetm-locked { border-top: 5px solid var(--tetm-gold); text-align: center; padding: 26px 18px; }
.tetm-app .tetm-locked .tetm-h2 { margin-bottom: 10px; }
.tetm-app .tetm-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 16px; }
.tetm-app .tetm-actions .tetm-btn { min-width: 140px; }
.tetm-app a.tetm-btn-primary,
.tetm-app a.tetm-btn-primary:visited,
.tetm-app a.tetm-btn-primary:hover { color: #fff; }
.tetm-app a.tetm-btn-secondary,
.tetm-app a.tetm-btn-secondary:visited,
.tetm-app a.tetm-btn-secondary:hover { color: var(--tetm-navy); }

/* ---------------------------------------------------------------- Wider screens */

@media (min-width: 640px) {
	.tetm-app .tetm-inner { padding: 24px 16px 48px; }
	.tetm-app .tetm-hero { padding: 28px 28px; }
	.tetm-app .tetm-hero .tetm-title { font-size: 2rem; }
	.tetm-app .tetm-card { padding: 22px 24px; }
	.tetm-app .tetm-btn-row .tetm-btn { flex: 0 1 auto; }
	.tetm-app .tetm-send-row { flex-direction: row; align-items: center; }
	.tetm-app .tetm-send { width: auto; min-width: 240px; }
	.tetm-app .tetm-send-note { text-align: left; }
	.tetm-app .tetm-report-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
	.tetm-app .tetm-mark { font-size: 3.2rem; }
	.tetm-app .tetm-markline { font-size: 1.8rem; }
	.tetm-app .tetm-strands { grid-template-columns: 1fr 1fr; }

	.tetm-app .tetm-points { border: 1px solid var(--tetm-line); border-radius: 8px; overflow: hidden; }
	.tetm-app .tetm-points thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: table-header-group; }
	.tetm-app .tetm-points tr { display: table-row; border: 0; border-radius: 0; margin: 0; padding: 0; }
	.tetm-app .tetm-points th {
		background: var(--tetm-navy);
		color: #fff;
		text-align: left;
		padding: 10px 12px;
		font-weight: 700;
		border: 0;
	}
	.tetm-app .tetm-points td {
		display: table-cell;
		padding: 10px 12px;
		border-top: 1px solid var(--tetm-line);
	}
	.tetm-app .tetm-points td::before { content: none; }
	.tetm-app .tetm-points tr.tetm-pt-yes td:first-child { box-shadow: inset 4px 0 0 var(--tetm-good); }
	.tetm-app .tetm-points tr.tetm-pt-no td:first-child { box-shadow: inset 4px 0 0 var(--tetm-bad); }
	.tetm-app .tetm-points td:first-child { white-space: nowrap; }
}

@media (max-width: 380px) {
	.tetm-app .tetm-dl-row { grid-template-columns: 1fr; gap: 0; }
}

/* ---------------------------------------------------------------- Teacher mark (v2) */

.tetm-app .tetm-teacher { padding: 14px 16px; border-left: 4px solid var(--tetm-navy); }
.tetm-app .tetm-teacher-label { display: block; font-size: 0.95rem; font-weight: 600; color: var(--tetm-navy); margin: 0 0 10px; }
.tetm-app .tetm-teacher-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.tetm-app .tetm-teacher-row .tetm-teacher-input { width: 6.5em; flex: 0 0 auto; }
.tetm-app .tetm-teacher-of { color: var(--tetm-muted); }
.tetm-app.tetm-app .tetm-teacher-row .tetm-btn { min-height: 46px; padding: 10px 20px; background: #fff; color: var(--tetm-navy); border: 1.5px solid var(--tetm-navy); }
.tetm-app.tetm-app .tetm-teacher-row .tetm-btn:hover { background: var(--tetm-navy-soft); }
.tetm-app.tetm-app .tetm-teacher-row .tetm-btn:disabled { opacity: 0.6; }
.tetm-app .tetm-teacher-msg { margin: 8px 0 0; font-size: 0.92rem; }
.tetm-app .tetm-teacher-msg:empty { display: none; }
.tetm-app .tetm-teacher-error { color: var(--tetm-bad); }
.tetm-app .tetm-teacher-thanks { margin: 0; font-weight: 600; color: var(--tetm-good); }

/* ---------------------------------------------------------------- Print */

@media print {
	html.tetm-printing body > *:not(#tetm-print-root) { display: none !important; }
	html.tetm-printing body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
	.tetm-print-root { display: block; }

	.tetm-app { font-size: 11.5pt; color: #000; }
	.tetm-app .tetm-hero,
	.tetm-app .tetm-form,
	.tetm-app .tetm-progress,
	.tetm-app .tetm-report-actions,
	.tetm-app .tetm-teacher,
	.tetm-app .tetm-banner,
	.tetm-app .tetm-remaining { display: none !important; }
	.tetm-app .tetm-buy-link { display: none !important; }
	.tetm-app .tetm-report { display: block !important; }
	.tetm-app .tetm-inner { max-width: none; padding: 0; }
	.tetm-app .tetm-card { box-shadow: none; border-color: #bbb; break-inside: avoid; page-break-inside: avoid; }
	.tetm-app .tetm-para,
	.tetm-app .tetm-rewrite,
	.tetm-app .tetm-other,
	.tetm-app .tetm-fault,
	.tetm-app .tetm-points tr { break-inside: avoid; page-break-inside: avoid; }
	.tetm-app .tetm-bar,
	.tetm-app .tetm-pip,
	.tetm-app .tetm-sec-fixes,
	.tetm-app .tetm-strand,
	.tetm-app .tetm-fault-fix,
	.tetm-app .tetm-quote,
	.tetm-app .tetm-bar-fill,
	.tetm-app .tetm-bar-range,
	.tetm-app mark.tetm-added,
	.tetm-app .tetm-legend-swatch,
	.tetm-app .tetm-lift,
	.tetm-app .tetm-rw-new,
	.tetm-app .tetm-kind,
	.tetm-app .tetm-chip { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------------------------------------------------------- Tutor Companion embeds (v2.3) */

.tetm-app.tetm-embed .tetm-inner { max-width: 760px; margin: 0; padding: 8px 0 16px; }
.tetm-app.tetm-embed .tetm-card { margin-bottom: 12px; }
.tetm-app.tetm-embed .tetm-embed-send .tetm-consent { margin-top: 0; }
.tetm-app.tetm-embed .tetm-send-note { color: var(--tetm-muted); }
.tetm-app.tetm-stored-report .tetm-report { display: block; padding: 0; }
