/**
 * Online test: instructions, test, submit, result and solutions.
 *
 * The approved design (docs/demos/online-test-system-demo.html, v2): white
 * surfaces on a light grey ground, one blue accent, line icons, English UI.
 * Everything is scoped under .pt-ot because the theme's own stylesheet still
 * loads on this page. Layout breakpoints follow the width of the test area
 * (container "ot"), not the window.
 */

body.pt-ot-body {
	margin: 0;
	background: #f3f5f8;
	overflow: hidden;
}

.pt-ot {
	--bg: #f3f5f8;
	--surface: #fff;
	--ink: #111827;
	--ink2: #374151;
	--muted: #6b7280;
	--line: #e5e7eb;
	--line2: #d1d5db;
	--hover: #f9fafb;
	--blue: #2563eb;
	--blue-d: #1d4ed8;
	--blue-bg: #eff4ff;
	--good: #16a34a;
	--good-bg: #f0fdf4;
	--bad: #dc2626;
	--bad-bg: #fef2f2;
	--warn: #b45309;
	--warn-bg: #fffbeb;
	--mark: #7c3aed;
	--skip: #9ca3af;
	--skip-bg: #f3f4f6;
	--sans: "Inter", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
	--qsize: 16px;

	position: fixed;
	inset: var(--wp-admin--admin-bar--height, 0) 0 0;
	z-index: 1000;
	container: ot / inline-size;
	color-scheme: light;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--sans);
	font-size: 14px;
	line-height: 1.45;
	-webkit-text-size-adjust: 100%;
}

/* The theme's element styles stop at the door. */
.pt-ot *,
.pt-ot *::before,
.pt-ot *::after { box-sizing: border-box; }

.pt-ot button,
.pt-ot select,
.pt-ot input,
.pt-ot textarea {
	margin: 0;
	font: inherit;
	color: inherit;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	min-height: 0;
}

.pt-ot button { cursor: pointer; }
.pt-ot button:disabled { cursor: not-allowed; opacity: 0.45; }
.pt-ot a { color: inherit; text-decoration: none; }
.pt-ot h1,
.pt-ot h2 { letter-spacing: normal; text-transform: none; }
.pt-ot table { margin: 0; border: 0; }
.pt-ot :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pt-ot [hidden] { display: none !important; }
.pt-ot .ot-num { font-variant-numeric: tabular-nums; }
.pt-ot .ot-muted { color: var(--muted); font-weight: 400; }

.pt-ot svg.ot-i {
	width: 16px;
	height: 16px;
	flex: none;
	fill: none;
	stroke: currentcolor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -3px;
}

.pt-ot svg.ot-i.lg { width: 20px; height: 20px; }

/* ---------- screens ---------- */
.pt-ot .ot-scr { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg); }
.pt-ot .ot-scroll { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; }

/* ---------- shared ---------- */
.pt-ot .ot-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1px solid var(--line2);
	background: var(--surface);
	border-radius: 6px;
	padding: 8px 14px;
	font-weight: 500;
	font-size: 14px;
	white-space: nowrap;
	line-height: 1.2;
	color: var(--ink);
}

.pt-ot .ot-btn:hover:not(:disabled) { background: var(--hover); }
.pt-ot .ot-btn.pri { background: var(--blue); border-color: var(--blue); color: #fff; }
.pt-ot .ot-btn.pri:hover:not(:disabled) { background: var(--blue-d); }
.pt-ot .ot-btn.out { border-color: var(--blue); color: var(--blue); }
.pt-ot .ot-btn.ghost { border-color: transparent; background: transparent; }
.pt-ot .ot-btn.sm { padding: 6px 10px; font-size: 13px; }
.pt-ot .ot-btn.icon { padding: 7px; width: 34px; height: 34px; }

.pt-ot .ot-tag {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-weight: 500;
	border-radius: 4px;
	padding: 2px 7px;
	background: var(--skip-bg);
	color: var(--ink2);
	white-space: nowrap;
}

.pt-ot .ot-tag.good { background: var(--good-bg); color: var(--good); }
.pt-ot .ot-tag.bad { background: var(--bad-bg); color: var(--bad); }
.pt-ot .ot-tag.blue { background: var(--blue-bg); color: var(--blue-d); }
.pt-ot .ot-tag.warn { background: var(--warn-bg); color: var(--warn); }

.pt-ot .ot-wrap {
	max-width: 1000px;
	margin: 0 auto;
	padding: 24px 20px 32px;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 16px;
}

.pt-ot .ot-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.pt-ot .ot-ph { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; }
.pt-ot .ot-ph small { margin-left: auto; font-weight: 400; color: var(--muted); font-size: 12px; }
.pt-ot .ot-pb { padding: 16px; }
.pt-ot .ot-pb.tight { padding-top: 6px; padding-bottom: 6px; }
.pt-ot .ot-col { display: grid; gap: 16px; min-width: 0; }

.pt-ot .ot-seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; flex: none; background: var(--surface); }
.pt-ot .ot-seg button { border: 0; background: none; padding: 5px 10px; font-size: 13px; color: var(--muted); border-radius: 0; }
.pt-ot .ot-seg button + button { border-left: 1px solid var(--line2); }
.pt-ot .ot-seg button[aria-pressed="true"] { background: var(--blue-bg); color: var(--blue-d); font-weight: 600; }

.pt-ot .ot-appbar {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 0 20px;
	height: 56px;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	flex: none;
}

.pt-ot .ot-appbar h2 { font-size: 15px; margin: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--ink); }
.pt-ot .ot-sp { flex: 1; }

.pt-ot .ot-avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--blue-bg);
	color: var(--blue-d);
	display: grid;
	place-items: center;
	font-weight: 600;
	font-size: 12px;
	flex: none;
}

.pt-ot .ot-page { font-size: 20px; margin: 0; font-weight: 600; text-wrap: balance; color: var(--ink); line-height: 1.3; }
.pt-ot .ot-sub { color: var(--muted); margin: 2px 0 0; }

.pt-ot .ot-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.pt-ot .ot-tabs button {
	border: 0;
	border-bottom: 2px solid transparent;
	background: none;
	padding: 10px 12px;
	font-size: 14px;
	color: var(--muted);
	margin-bottom: -1px;
	white-space: nowrap;
	border-radius: 0;
}

.pt-ot .ot-tabs button[aria-pressed="true"] { color: var(--blue-d); border-bottom-color: var(--blue); font-weight: 600; }
.pt-ot .ot-tabs .n { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 4px; }

.pt-ot .ot-empty { padding: 30px; text-align: center; color: var(--muted); }

.pt-ot .ot-toast {
	position: absolute;
	left: 50%;
	bottom: 76px;
	transform: translateX(-50%);
	z-index: 40;
	background: var(--ink);
	color: #fff;
	font-size: 13px;
	padding: 8px 14px;
	border-radius: 6px;
	max-width: calc(100% - 32px);
}

/* ---------- instructions ---------- */
.pt-ot .ot-resume {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 16px;
	align-items: center;
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 3px solid var(--blue);
	border-radius: 8px;
	padding: 14px 16px;
}

.pt-ot .ot-resume .t { font-weight: 600; }
.pt-ot .ot-resume .s { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.pt-ot .ot-resume .s span { display: inline-flex; gap: 5px; align-items: center; }
.pt-ot .ot-resume .pbar { flex: 1 1 160px; height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.pt-ot .ot-resume .pbar i { display: block; height: 100%; background: var(--blue); }

.pt-ot .ot-facts { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.pt-ot .ot-facts div { padding: 12px 14px; }
.pt-ot .ot-facts div + div { border-left: 1px solid var(--line); }
.pt-ot .ot-facts b { display: block; font-size: 17px; font-weight: 600; }
.pt-ot .ot-facts span { font-size: 12px; color: var(--muted); display: flex; gap: 5px; align-items: center; }

.pt-ot .ot-ibox { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }

.pt-ot .ot-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pt-ot .ot-rules li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--ink2); line-height: 1.55; margin: 0; }
.pt-ot .ot-rules li svg { margin-top: 2px; color: var(--blue); }

.pt-ot .ot-kv { width: 100%; border-collapse: collapse; font-size: 13px; }
.pt-ot .ot-kv th,
.pt-ot .ot-kv td { padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: none; }
.pt-ot .ot-kv tr:last-child td { border-bottom: 0; }
.pt-ot .ot-kv th { color: var(--muted); font-weight: 500; font-size: 12px; }
.pt-ot .ot-kv td + td,
.pt-ot .ot-kv th + th { text-align: right; padding-left: 8px; }

.pt-ot .ot-legend { display: grid; gap: 9px; font-size: 13px; color: var(--ink2); }
.pt-ot .ot-legend div { display: flex; align-items: center; gap: 10px; }

.pt-ot .ot-field { display: grid; gap: 6px; }
.pt-ot .ot-field label { font-size: 13px; color: var(--ink2); font-weight: 500; }
.pt-ot .ot-field select,
.pt-ot .ot-field textarea { border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; background: var(--surface); width: 100%; height: auto; }

.pt-ot .ot-ready {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	background: var(--surface);
	border-top: 1px solid var(--line);
	padding: 12px 20px;
	flex: none;
}

.pt-ot .ot-ready label { display: flex; gap: 9px; align-items: center; cursor: pointer; font-size: 14px; margin: 0; }
.pt-ot .ot-ready input { width: 17px; height: 17px; accent-color: var(--blue); flex: none; }

/* ---------- palette cell ---------- */
.pt-ot .ot-pc {
	position: relative;
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 32px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	border: 1px solid var(--line2);
	background: var(--surface);
	color: var(--ink2);
	flex: none;
	padding: 0;
}

.pt-ot .ot-pc.na { background: var(--bad); border-color: var(--bad); color: #fff; }
.pt-ot .ot-pc.an { background: var(--good); border-color: var(--good); color: #fff; }

.pt-ot .ot-pc.mk,
.pt-ot .ot-pc.am { background: var(--mark); border-color: var(--mark); color: #fff; border-radius: 50%; width: 32px; }

.pt-ot .ot-pc.am::after {
	content: "";
	position: absolute;
	right: -1px;
	bottom: -1px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--good);
	border: 2px solid var(--surface);
}

.pt-ot .ot-pc.cur { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--blue); }
.pt-ot .ot-pc.mini { width: 22px; height: 20px; font-size: 11px; border-radius: 4px; }

.pt-ot .ot-pc.mini.mk,
.pt-ot .ot-pc.mini.am { width: 20px; border-radius: 50%; }
.pt-ot .ot-pc.mini.am::after { width: 8px; height: 8px; }

/* ---------- test ---------- */
.pt-ot .ot-thead {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 56px;
	padding: 0 16px;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	flex: none;
}

.pt-ot .ot-ttl { min-width: 0; flex: 1; }
.pt-ot .ot-ttl b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-ot .ot-ttl span { font-size: 12px; color: var(--muted); }
.pt-ot .ot-timer { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.pt-ot .ot-timer small { font-size: 12px; color: var(--muted); }
.pt-ot .ot-timer b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.pt-ot .ot-timer.low b,
.pt-ot .ot-timer.low svg { color: var(--bad); }

.pt-ot .ot-tbar2 {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 16px;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	flex: none;
	min-height: 44px;
}

.pt-ot .ot-tbar2 .ot-tabs { border-bottom: 0; flex: 1; min-width: 0; }
.pt-ot .ot-tbar2 .ot-tabs button { padding: 12px 10px; }
.pt-ot .ot-lsel { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; margin: 0 0 0 auto; }
.pt-ot .ot-lsel select { border: 1px solid var(--line2); border-radius: 6px; padding: 4px 6px; background: var(--surface); font-size: 13px; color: var(--ink); height: auto; width: auto; }

.pt-ot .ot-tbody { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 0; position: relative; }
.pt-ot .ot-qcol { display: flex; flex-direction: column; min-height: 0; background: var(--surface); }

.pt-ot .ot-qhead {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 20px;
	border-bottom: 1px solid var(--line);
	font-size: 13px;
	color: var(--muted);
	flex-wrap: wrap;
}

.pt-ot .ot-qhead b { color: var(--ink); font-size: 14px; font-weight: 600; }
.pt-ot .ot-marks { display: inline-flex; gap: 6px; }
.pt-ot .ot-it { display: inline-flex; align-items: center; gap: 5px; }
.pt-ot .ot-qhead .ot-btn.icon { width: 30px; height: 30px; padding: 5px; border-color: transparent; color: var(--muted); }
.pt-ot .ot-qhead .ot-zoom { font-weight: 600; font-size: 13px; }
.pt-ot .ot-qscroll { flex: 1; overflow: auto; padding: 20px 24px 28px; }

/* question body, as printed on the server (PYQ_Online_Test_Sheet) */
.pt-ot .ot-qtext { font-size: var(--qsize); line-height: 1.7; color: var(--ink); max-width: 820px; overflow-wrap: anywhere; }
.pt-ot .ot-qtext p { margin: 0 0 0.6em; }
.pt-ot .ot-qtext p:last-child { margin-bottom: 0; }
.pt-ot .ot-qtext > * + * { margin-top: 0.6em; }
.pt-ot .ot-passage { padding: 0.7em 0.9em; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; }
.pt-ot .ot-assert { margin: 0; }
.pt-ot .ot-ar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5em; margin: 0.3em 0; }
.pt-ot .ot-ar b { white-space: nowrap; font-weight: 600; }
.pt-ot .ot-lead { margin: 0; }
.pt-ot .ot-list { list-style: none; margin: 0.2em 0 0.4em; padding: 0; }
.pt-ot .ot-list li { display: grid; grid-template-columns: 2.3em minmax(0, 1fr); margin: 0.25em 0; }
.pt-ot .ot-l { font-weight: 500; color: var(--ink2); }
.pt-ot .ot-tw { overflow-x: auto; }

/* a numbered list typed inside the question text */
.pt-ot .pt-stmt-item { display: grid; grid-template-columns: 2.3em minmax(0, 1fr); margin: 0.25em 0; }
.pt-ot .pt-stmt-num { font-weight: 500; color: var(--ink2); }

.pt-ot .ot-match,
.pt-ot .ot-grid { border-collapse: collapse; width: 100%; font-size: 0.95em; }

.pt-ot .ot-match th,
.pt-ot .ot-match td { padding: 0.35em 0.7em 0.35em 0; text-align: left; vertical-align: top; border: 0; background: none; }
.pt-ot .ot-match th { font-weight: 600; border-bottom: 1px solid var(--line); }
.pt-ot .ot-match td.ot-l { width: 2em; }
.pt-ot .ot-match td.ot-colon { width: 1em; padding-right: 0.4em; }

.pt-ot .ot-grid th,
.pt-ot .ot-grid td { padding: 0.4em 0.6em; border: 1px solid var(--line); text-align: left; vertical-align: top; background: none; }
.pt-ot .ot-grid th { background: var(--hover); font-weight: 600; }

/* a table typed inside question, passage or explanation text */
.pt-ot .ot-qtext table:not([class]),
.pt-ot .ot-expl table:not([class]) { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 0.4em 0; }

.pt-ot .ot-expl table:not([class]) td,
.pt-ot .ot-expl table:not([class]) th,
.pt-ot .ot-qtext table:not([class]) td,
.pt-ot .ot-qtext table:not([class]) th { border: 1px solid var(--line2); padding: 0.35em 0.6em; text-align: left; vertical-align: top; background: none; }

.pt-ot .ot-fig { margin: 0.4em 0; }

.pt-ot .ot-fig svg,
.pt-ot .ot-fig img { max-width: min(100%, 420px); height: auto; display: block; }

.pt-ot .ot-opt-img { display: block; margin-top: 6px; }

.pt-ot .ot-opt-img,
.pt-ot img.ot-opt-img,
.pt-ot .ot-opt-img svg { max-width: min(100%, 260px); height: auto; }

/* options */
.pt-ot .ot-opts { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; max-width: 820px; }
.pt-ot .ot-opts li { margin: 0; min-width: 0; }
.pt-ot .ot-opts.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.pt-ot .ot-opt {
	width: 100%;
	display: grid;
	grid-template-columns: 28px minmax(0, 1fr);
	gap: 12px;
	align-items: start;
	text-align: left;
	border: 1px solid var(--line2);
	background: var(--surface);
	border-radius: 8px;
	padding: 11px 14px;
	font-size: calc(var(--qsize) - 1px);
	line-height: 1.55;
	color: var(--ink);
	font-weight: 400;
	overflow-wrap: anywhere;
}

.pt-ot button.ot-opt:hover { background: var(--hover); }

.pt-ot .ot-ol {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 1.5px solid var(--line2);
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted);
	margin-top: -1px;
}

.pt-ot .ot-opt[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-bg); }
.pt-ot .ot-opt[aria-pressed="true"] .ot-ol { background: var(--blue); border-color: var(--blue); color: #fff; }

/* a code grid (match the lists): one header row, each option a row of codes */
.pt-ot .ot-codes { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(2.4em, 1fr); gap: 4px; text-align: center; }
.pt-ot .ot-codes-head { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 0 15px; font-size: 13px; font-weight: 600; color: var(--muted); max-width: 820px; margin-top: 18px; }
.pt-ot .ot-codes-head + .ot-opts { margin-top: 6px; }

.pt-ot .ot-tfoot {
	display: flex;
	gap: 8px;
	align-items: center;
	padding: 10px 16px;
	background: var(--surface);
	border-top: 1px solid var(--line);
	flex: none;
}

.pt-ot .ot-tfoot .ot-sp { flex: 1; }

.pt-ot .ot-side { width: 280px; border-left: 1px solid var(--line); background: var(--surface); overflow: auto; display: flex; flex-direction: column; }
.pt-ot .ot-sh { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.pt-ot .ot-sh .ot-btn { margin-left: auto; }
.pt-ot .ot-sh span { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-ot .ot-cnt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 8px; padding: 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--ink2); }
.pt-ot .ot-cnt div { display: flex; align-items: center; gap: 8px; }
.pt-ot .ot-cnt div.w { grid-column: 1 / -1; }
.pt-ot .ot-pgrid { padding: 6px 14px 16px; }
.pt-ot .ot-gs { font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 8px; }
.pt-ot .ot-gg { display: grid; grid-template-columns: repeat(5, 36px); gap: 10px; }

.pt-ot .ot-collapse {
	position: absolute;
	top: 50%;
	right: 280px;
	transform: translate(50%, -50%);
	width: 22px;
	height: 44px;
	border: 1px solid var(--line2);
	background: var(--surface);
	border-radius: 6px;
	display: grid;
	place-items: center;
	padding: 0;
	color: var(--muted);
	z-index: 3;
}

.pt-ot .ot-tbody.closed .ot-side { display: none; }
.pt-ot .ot-tbody.closed .ot-collapse { right: 0; transform: translate(0, -50%); border-radius: 6px 0 0 6px; }
.pt-ot .ot-palbtn,
.pt-ot .ot-scrim,
.pt-ot .ot-show-s { display: none; }

/* ---------- modal ---------- */
.pt-ot .ot-modal { position: absolute; inset: 0; background: rgb(17 24 39 / 45%); display: grid; place-items: center; z-index: 20; padding: 16px; }
.pt-ot .ot-mbox { background: var(--surface); border-radius: 10px; max-width: 580px; width: 100%; display: flex; flex-direction: column; max-height: 100%; overflow: hidden; margin: 0; }
.pt-ot .ot-mh { padding: 16px 20px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 16px; }
.pt-ot .ot-mb { padding: 16px 20px; overflow: auto; display: grid; gap: 14px; }
.pt-ot .ot-mf { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.pt-ot .ot-sumt { width: 100%; border-collapse: collapse; font-size: 13px; }

.pt-ot .ot-sumt th,
.pt-ot .ot-sumt td { padding: 9px 4px; border: 0; border-bottom: 1px solid var(--line); text-align: center; background: none; }

.pt-ot .ot-sumt th:first-child,
.pt-ot .ot-sumt td:first-child { text-align: left; }
.pt-ot .ot-sumt th { font-weight: 500; color: var(--muted); font-size: 12px; vertical-align: bottom; }
.pt-ot .ot-sumt th .ot-pc { display: grid; margin: 0 auto 4px; }
.pt-ot .ot-sumt tr.tot td { font-weight: 600; border-bottom: 0; }
.pt-ot .ot-note { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-bg); color: var(--warn); border-radius: 6px; padding: 10px 12px; font-size: 13px; }
.pt-ot .ot-note.info { background: var(--blue-bg); color: var(--blue-d); }

/* ---------- result ---------- */
.pt-ot .ot-rsum { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.pt-ot .ot-rt { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.pt-ot .ot-rt h1 { font-size: 17px; margin: 0; font-weight: 600; color: var(--ink); line-height: 1.3; }
.pt-ot .ot-rt .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-ot .ot-kp { display: grid; grid-template-columns: repeat(5, 1fr); }
.pt-ot .ot-kp > div { padding: 14px 16px; min-width: 0; }
.pt-ot .ot-kp > div + div { border-left: 1px solid var(--line); }
.pt-ot .ot-kp span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pt-ot .ot-kp b { display: block; font-size: 20px; font-weight: 600; margin-top: 4px; }
.pt-ot .ot-kp b small { font-size: 13px; color: var(--muted); font-weight: 400; }
.pt-ot .ot-split { padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.pt-ot .ot-bar3 { display: flex; height: 8px; border-radius: 9px; overflow: hidden; gap: 2px; margin-bottom: 10px; background: var(--skip-bg); }
.pt-ot .ot-bar3 i { display: block; height: 100%; }
.pt-ot .ot-lg { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink2); }
.pt-ot .ot-lg span { display: inline-flex; align-items: center; gap: 6px; }
.pt-ot .ot-lg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.pt-ot .ot-rgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pt-ot .ot-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }

.pt-ot .ot-tbl th,
.pt-ot .ot-tbl td { padding: 10px 8px; border: 0; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; background: none; }

.pt-ot .ot-tbl th:first-child,
.pt-ot .ot-tbl td:first-child { text-align: left; padding-left: 0; }

.pt-ot .ot-tbl th:last-child,
.pt-ot .ot-tbl td:last-child { padding-right: 0; }
.pt-ot .ot-tbl th { font-weight: 500; color: var(--muted); font-size: 12px; }
.pt-ot .ot-tbl tr:last-child td { border-bottom: 0; }
.pt-ot .ot-tbl tr.me td { color: var(--blue-d); font-weight: 600; }
.pt-ot .ot-tbl td.c { color: var(--good); }
.pt-ot .ot-tbl td.w { color: var(--bad); }
.pt-ot .ot-ox { overflow-x: auto; }

.pt-ot .ot-hist { position: relative; height: 150px; display: flex; align-items: flex-end; gap: 3px; padding-top: 28px; border-bottom: 1px solid var(--line2); }
.pt-ot .ot-hist i { flex: 1; background: #d1d5db; border-radius: 2px 2px 0 0; min-height: 2px; }
.pt-ot .ot-hist i.me { background: var(--blue); }

.pt-ot .ot-you {
	position: absolute;
	top: 0;
	transform: translateX(-50%);
	font-size: 11px;
	font-weight: 600;
	color: var(--blue-d);
	white-space: nowrap;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.pt-ot .ot-you::after { content: ""; width: 1px; height: 8px; background: var(--blue); margin-top: 2px; }
.pt-ot .ot-hax { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.pt-ot .ot-insight { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink2); padding: 10px 0 0; line-height: 1.5; }
.pt-ot .ot-insight svg { color: var(--blue); margin-top: 1px; }

.pt-ot .ot-tip {
	position: absolute;
	pointer-events: none;
	background: var(--ink);
	color: #fff;
	font-size: 12px;
	padding: 5px 8px;
	border-radius: 4px;
	white-space: nowrap;
	z-index: 30;
	transform: translate(-50%, -110%);
}

.pt-ot .ot-topic { display: grid; grid-template-columns: 140px minmax(0, 1fr) 72px; gap: 12px; align-items: center; font-size: 13px; padding: 7px 0; }
.pt-ot .ot-topic > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-ot .ot-tr { height: 8px; background: var(--skip-bg); border-radius: 9px; overflow: hidden; }
.pt-ot .ot-tr i { display: block; height: 100%; border-radius: 9px; }
.pt-ot .ot-tv { text-align: right; font-variant-numeric: tabular-nums; }
.pt-ot .ot-tv small { color: var(--muted); }

.pt-ot .ot-tbars { display: flex; align-items: flex-end; gap: 6px; height: 140px; border-bottom: 1px solid var(--line2); }
.pt-ot .ot-tcol { flex: 1 0 6px; display: flex; justify-content: center; align-items: flex-end; height: 100%; position: relative; }
.pt-ot .ot-tcol i { display: block; width: 100%; max-width: 24px; border-radius: 3px 3px 0 0; }
.pt-ot .ot-avg { position: absolute; left: 8%; right: 8%; height: 0; border-top: 2px dashed var(--ink2); }
.pt-ot .ot-tbx { display: flex; gap: 6px; font-size: 11px; color: var(--muted); margin-top: 4px; }
.pt-ot .ot-tbx span { flex: 1 0 6px; text-align: center; }
.pt-ot .ot-tscroll { overflow-x: auto; }
.pt-ot .ot-tscroll.many .ot-tbars,
.pt-ot .ot-tscroll.many .ot-tbx { gap: 3px; }
.pt-ot .ot-lb td { padding: 11px 8px; }
.pt-ot .ot-rk { width: 56px; color: var(--muted); font-weight: 500; }
.pt-ot .ot-rk svg { color: #d97706; }
.pt-ot .ot-lb tr.gap td { text-align: center; color: var(--muted); padding: 2px; }

.pt-ot .ot-loading { display: grid; place-items: center; gap: 12px; padding: 60px 20px; color: var(--muted); text-align: center; }

.pt-ot .ot-spin {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 3px solid var(--line);
	border-top-color: var(--blue);
	animation: ot-spin 0.8s linear infinite;
}

@keyframes ot-spin { to { transform: rotate(360deg); } }

/* ---------- solutions ---------- */
.pt-ot .ot-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-ot .ot-chips button { border: 1px solid var(--line2); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--ink2); }
.pt-ot .ot-chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pt-ot .ot-chips button .ot-num { opacity: 0.7; margin-left: 5px; }
.pt-ot .ot-qstrip { display: flex; gap: 6px; flex-wrap: wrap; }
.pt-ot .ot-qstrip button { width: 36px; height: 28px; border-radius: 5px; border: 1px solid var(--line2); background: var(--surface); font-size: 12px; font-weight: 500; padding: 0; }
.pt-ot .ot-qstrip .c { background: var(--good-bg); border-color: #86efac; color: var(--good); }
.pt-ot .ot-qstrip .w { background: var(--bad-bg); border-color: #fca5a5; color: var(--bad); }

.pt-ot .ot-qstrip .s,
.pt-ot .ot-qstrip .n { color: var(--muted); }
.pt-ot .ot-solc .ot-sh { flex-wrap: wrap; gap: 6px 14px; padding: 12px 16px; font-size: 13px; color: var(--muted); }
.pt-ot .ot-solc .ot-sh b { color: var(--ink); }
.pt-ot .ot-solc .ot-sh .ot-sp { flex: 1; }
.pt-ot .ot-sb { padding: 16px; }
.pt-ot .ot-solc .ot-opt { cursor: default; }
.pt-ot .ot-solc .ot-opt.right { border-color: var(--good); background: var(--good-bg); }
.pt-ot .ot-solc .ot-opt.right .ot-ol { background: var(--good); border-color: var(--good); color: #fff; }
.pt-ot .ot-solc .ot-opt.wrong { border-color: var(--bad); background: var(--bad-bg); }
.pt-ot .ot-solc .ot-opt.wrong .ot-ol { background: var(--bad); border-color: var(--bad); color: #fff; }
.pt-ot .ot-solc .ot-opt.mine { border-color: var(--blue); background: var(--blue-bg); }
.pt-ot .ot-why { grid-column: 2; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.pt-ot .ot-opt.right .ot-why { color: var(--good); }
.pt-ot .ot-opt.wrong .ot-why { color: var(--bad); }
.pt-ot .ot-opt.mine .ot-why { color: var(--blue-d); }
.pt-ot .ot-expl { margin-top: 16px; background: var(--hover); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 15px; line-height: 1.65; max-width: 820px; overflow-wrap: anywhere; }
.pt-ot .ot-expl p { margin: 0 0 0.5em; }
.pt-ot .ot-expl p:last-child { margin-bottom: 0; }
.pt-ot .ot-expl .h { display: flex; gap: 6px; align-items: center; font-size: 13px; margin-bottom: 4px; color: var(--ink2); }
.pt-ot .ot-expl .ot-fig { margin-top: 0.6em; }

/* ---------- Demo Test (owner-approved 2026-10-15) ---------- */
.pt-ot .ot-ttl .ot-demotag { margin-right: 6px; padding: 1px 7px; border-radius: 4px; background: var(--blue-bg); color: var(--blue-d); font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.pt-ot .ot-demo-note { margin-top: 2px; }
.pt-ot .ot-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 14px; padding: 14px 16px; border: 1px solid #bfdbfe; border-radius: 8px; background: var(--blue-bg); }
.pt-ot .ot-buy__tx { flex: 1 1 240px; min-width: 0; }
.pt-ot .ot-buy__tx b { display: block; color: var(--ink); font-size: 15px; }
.pt-ot .ot-buy__tx span { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; color: var(--ink2); font-size: 13px; }
.pt-ot .ot-buy__tx i { display: inline-flex; align-items: center; gap: 4px; font-style: normal; }
.pt-ot .ot-buy__tx .ot-i { width: 15px; height: 15px; color: var(--good); }
.pt-ot .ot-buy__pr { display: flex; align-items: baseline; gap: 6px; }
.pt-ot .ot-buy__pr b { font-size: 20px; color: var(--ink); }
.pt-ot .ot-buy__pr s { color: var(--muted); font-size: 13px; }
.pt-ot .ot-lockbox { display: grid; justify-items: center; gap: 8px; text-align: center; }
.pt-ot .ot-lockbig { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--blue-bg); color: var(--blue); }
.pt-ot .ot-lockbig .ot-i { width: 26px; height: 26px; }
.pt-ot .ot-lockbox b { font-size: 16px; color: var(--ink); }
.pt-ot .ot-lockbox p { margin: 0; color: var(--ink2); font-size: 13.5px; }

/* ---------- narrow test area ---------- */
@container ot (max-width: 800px) {
	.pt-ot .ot-ibox { grid-template-columns: minmax(0, 1fr); }
}

@container ot (max-width: 760px) {
	.pt-ot .ot-thead { padding: 0 12px; height: 52px; }
	.pt-ot .ot-ttl span,
	.pt-ot .ot-timer small,
	.pt-ot .ot-lsel span,
	.pt-ot .ot-collapse,
	.pt-ot .ot-hide-s,
	.pt-ot .ot-tbar2 .ot-tabs .n { display: none; }
	.pt-ot .ot-tbar2 { padding: 0 8px 0 4px; }
	.pt-ot .ot-tbar2 .ot-tabs button { padding: 12px 8px; font-size: 13px; }
	.pt-ot .ot-palbtn { display: inline-flex; }
	.pt-ot .ot-show-s { display: inline; }

	.pt-ot .ot-side {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: min(300px, 88%);
		z-index: 6;
		transform: translateX(100%);
		visibility: hidden;
		transition: transform 0.2s, visibility 0.2s;
		box-shadow: -8px 0 24px rgb(17 24 39 / 12%);
	}

	.pt-ot .ot-tbody.palopen .ot-side { transform: none; visibility: visible; }
	.pt-ot .ot-tbody.palopen .ot-scrim { display: block; position: absolute; inset: 0; background: rgb(17 24 39 / 30%); z-index: 5; }
	.pt-ot .ot-tbody.closed .ot-side { display: flex; }
	.pt-ot .ot-tfoot { padding: 8px 10px; gap: 6px; }
	.pt-ot .ot-tfoot .ot-btn { padding: 9px 10px; flex: none; }
	.pt-ot .ot-tfoot .ot-sp { display: none; }
	.pt-ot .ot-tfoot .ot-btn[data-act="next"] { flex: 1 1 auto; min-width: 0; }
	.pt-ot .ot-opts.grid { grid-template-columns: minmax(0, 1fr); }
	.pt-ot .ot-kp { grid-template-columns: 1fr 1fr; }
	.pt-ot .ot-kp > div { border-left: 0 !important; border-top: 1px solid var(--line); }
	.pt-ot .ot-kp > div:first-child { grid-column: 1 / -1; border-top: 0; }
	.pt-ot .ot-kp > div:nth-child(3),
	.pt-ot .ot-kp > div:nth-child(5) { border-left: 1px solid var(--line) !important; }
	.pt-ot .ot-rgrid { grid-template-columns: minmax(0, 1fr); }
}

@container ot (max-width: 700px) {
	.pt-ot .ot-wrap { padding: 16px 14px 24px; gap: 12px; }
	.pt-ot .ot-appbar { padding: 0 12px; height: 52px; }
	.pt-ot .ot-facts { grid-template-columns: 1fr 1fr; }
	.pt-ot .ot-facts div:nth-child(3) { border-left: 0; }
	.pt-ot .ot-facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
	.pt-ot .ot-ready { padding: 10px 14px; }
	.pt-ot .ot-ready .ot-btn { width: 100%; }
	.pt-ot .ot-qhead { padding: 6px 14px; gap: 8px; }
	.pt-ot .ot-qscroll { padding: 14px 14px 22px; }
	.pt-ot .ot-mf .ot-btn { flex: 1; }
	.pt-ot .ot-mh,
	.pt-ot .ot-mb,
	.pt-ot .ot-mf { padding-left: 14px; padding-right: 14px; }
	.pt-ot .ot-topic { grid-template-columns: 96px minmax(0, 1fr) 60px; gap: 8px; }
	.pt-ot #ot-rtabs { gap: 0; }
	.pt-ot #ot-rtabs button { padding: 10px 6px; font-size: 13px; }
	.pt-ot #ot-rfirst { display: none; }
	.pt-ot .ot-codes-head { padding: 0 11px; gap: 10px; }
}

@container ot (max-width: 380px) {
	.pt-ot .ot-qhead { gap: 6px; }
	.pt-ot .ot-qhead .ot-it { display: none; }
	.pt-ot .ot-tfoot .ot-show-s { display: none; }
	.pt-ot .ot-tfoot .ot-btn[data-act="next"] { padding: 9px 8px; }
}

/* Tablet (test area 761-1100px): long footer labels pushed Save & Next under the palette. */
@container ot (min-width: 761px) and (max-width: 1100px) {
	.pt-ot .ot-tfoot .ot-hide-s { display: none; }
	.pt-ot .ot-tfoot .ot-show-s { display: inline; }
}

@media (prefers-reduced-motion: reduce) {
	.pt-ot .ot-side { transition: none; }
	.pt-ot .ot-spin { animation-duration: 2s; }
}
