/* 实训作业 · 与 aklh 新版站点同一套设计语言（令牌来自 frontend.css :root） */

.akc-hw-page {
	--hw-ink: var(--ak-ink, #172033);
	--hw-muted: var(--ak-muted, #6b7a90);
	--hw-line: var(--ak-line, #e6edf6);
	--hw-blue: var(--ak-blue, #2563eb);
	--hw-green: var(--ak-green, #16a34a);
	width: min(1024px, 100%);
	margin: 0 auto;
	color: var(--hw-ink);
	font-size: 14px;
	line-height: 1.7;
}

.akc-hw-page * {
	box-sizing: border-box;
}

/* ---------------------------------------------------------------- 页头 */
.hw-hero {
	padding: 6px 2px 22px;
}

.hw-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 11.5px;
	font-weight: 750;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--hw-blue);
	background: #eff6ff;
	border-radius: 999px;
	padding: 5px 12px;
}

.hw-hero h1 {
	margin: 14px 0 10px;
	font-size: clamp(30px, 3.4vw, 44px);
	line-height: 1.1;
	letter-spacing: -1.4px;
	font-weight: 800;
}

.hw-hero h1 em {
	font-style: normal;
	background: linear-gradient(120deg, var(--hw-blue), #0ea5e9 60%, #22d3ee);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.hw-sub {
	margin: 0;
	max-width: 660px;
	color: var(--hw-muted);
	font-size: 14.5px;
	line-height: 1.8;
}

.hw-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.hw-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: #475569;
	background: #fff;
	border: 1px solid var(--hw-line);
	border-radius: 999px;
	padding: 5px 13px;
}

.hw-chip b {
	color: var(--hw-ink);
	font-weight: 750;
}

/* ---------------------------------------------------------------- 卡片通用 */
.hw-card {
	background: #fff;
	border: 1px solid var(--hw-line);
	border-radius: 22px;
	box-shadow: 0 12px 40px rgba(25, 54, 88, .07);
	padding: 20px 22px;
	margin-bottom: 16px;
}

/* 顶部提示条（错误 / 成功） */
.hw-flash {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	border-radius: 14px;
	padding: 12px 16px;
	font-size: 13.5px;
	margin-bottom: 14px;
	border: 1px solid transparent;
}

.hw-flash.is-err {
	background: #fef2f2;
	border-color: #fecaca;
	color: #b91c1c;
}

.hw-flash.is-ok {
	background: #f0fdf4;
	border-color: #bbf7d0;
	color: #15803d;
}

/* ---------------------------------------------------------------- 教师视角 */
.hw-teach {
	position: relative;
	background: linear-gradient(180deg, #fffdf5, #fff);
	border: 1px solid #f5e6bd;
	border-radius: 20px;
	padding: 16px 18px 14px;
	margin-bottom: 16px;
}

.hw-teach::before {
	content: "";
	position: absolute;
	left: 0;
	top: 18px;
	bottom: 18px;
	width: 3px;
	border-radius: 3px;
	background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.hw-teach-head {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 4px;
}

.hw-teach-tag {
	font-size: 12px;
	font-weight: 750;
	color: #92400e;
	background: #fef3c7;
	border-radius: 999px;
	padding: 3px 10px;
}

.hw-teach-note {
	font-size: 12.5px;
	color: #8a6a2f;
	line-height: 1.65;
}

.hw-teach-note strong {
	color: #713f12;
}

.hw-teach-form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 10px;
}

/* ---------------------------------------------------------------- 表单控件统一 */
.akc-hw-page select,
.akc-hw-page input[type="text"],
.akc-hw-page input[type="number"],
.akc-hw-page textarea {
	font: inherit;
	border: 1px solid #d7e1ee;
	border-radius: 11px;
	background: #fff;
	color: var(--hw-ink);
	padding: 8px 12px;
	transition: border-color .16s ease, box-shadow .16s ease;
}

.akc-hw-page select:focus,
.akc-hw-page input[type="text"]:focus,
.akc-hw-page textarea:focus {
	outline: 0;
	border-color: #93c5fd;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.akc-hw-page input[type="file"] {
	font-size: 12.5px;
	color: var(--hw-muted);
	max-width: 100%;
}

.hw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1px solid transparent;
	border-radius: 12px;
	padding: 9px 18px;
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
	white-space: nowrap;
}

.hw-btn.is-primary {
	background: linear-gradient(120deg, var(--hw-blue), #0ea5e9);
	color: #fff;
	box-shadow: 0 8px 20px rgba(37, 99, 235, .26);
}

.hw-btn.is-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 12px 26px rgba(37, 99, 235, .32);
	color: #fff;
}

.hw-btn.is-ghost {
	background: #fff;
	border-color: #dbe6f3;
	color: #475569;
}

.hw-btn.is-ghost:hover {
	background: #f5f9ff;
	border-color: #bfdbfe;
	color: var(--hw-blue);
}

.hw-btn.is-sm {
	padding: 7px 13px;
	font-size: 12.5px;
	border-radius: 10px;
}

/* WP 自带按钮在本页也换成同一套 */
.akc-hw-page .button,
.akc-hw-page .button-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	border: 1px solid #dbe6f3;
	background: #fff;
	color: #475569;
	font-size: 13px;
	font-weight: 700;
	padding: 8px 16px;
	line-height: 1.2;
	box-shadow: none;
	text-shadow: none;
	height: auto;
	transition: transform .16s ease, box-shadow .16s ease;
}

.akc-hw-page .button-primary {
	background: linear-gradient(120deg, var(--hw-blue), #0ea5e9);
	border-color: transparent;
	color: #fff;
	box-shadow: 0 8px 20px rgba(37, 99, 235, .26);
}

.akc-hw-page .button:hover,
.akc-hw-page .button-primary:hover {
	transform: translateY(-1px);
}

/* ---------------------------------------------------------------- 今日排行榜 */
.hw-rank {
	padding: 18px 20px;
}

.hw-rank-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.hw-rank-head b {
	font-size: 15.5px;
	letter-spacing: -.2px;
}

.hw-rank-head span {
	font-size: 12px;
	color: var(--hw-muted);
}

.hw-rank-list {
	display: grid;
	gap: 5px;
}

.hw-rank-row {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 12px;
	font-size: 13.5px;
	background: #f8fafc;
}

.hw-rank-row.is-me {
	background: #f0fdf4;
	box-shadow: inset 0 0 0 1px #bbf7d0;
}

.hw-rank-row .no {
	width: 24px;
	text-align: center;
	font-weight: 800;
	color: #94a3b8;
}

.hw-rank-row .nm {
	font-weight: 650;
	min-width: 64px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hw-rank-row .nm .me {
	font-size: 10.5px;
	background: var(--hw-green);
	color: #fff;
	border-radius: 5px;
	padding: 1px 5px;
	margin-left: 5px;
	vertical-align: 1px;
}

.hw-rank-row .obj,
.hw-rank-row .code {
	font-size: 12px;
	color: var(--hw-muted);
	min-width: 44px;
	text-align: right;
}

.hw-rank-row .tt {
	margin-left: auto;
	font-weight: 800;
	color: #0f766e;
	font-size: 15px;
	min-width: 50px;
	text-align: right;
}

.hw-rank-me {
	margin-top: 10px;
	font-size: 12.5px;
	color: #374151;
	background: #f8fafc;
	border-radius: 11px;
	padding: 8px 12px;
}

/* ---------------------------------------------------------------- 分组标题 */
.hw-group {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 26px 2px 12px;
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -.3px;
}

.hw-group em {
	font-style: normal;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--hw-muted);
	background: #eef2f8;
	border-radius: 999px;
	padding: 2px 9px;
}

/* ---------------------------------------------------------------- 作业卡 */
.hw-item {
	background: #fff;
	border: 1px solid var(--hw-line);
	border-radius: 22px;
	box-shadow: 0 10px 32px rgba(25, 54, 88, .06);
	padding: 16px 19px;
	margin-bottom: 13px;
	transition: box-shadow .2s ease, transform .2s ease;
}

.hw-item:hover {
	box-shadow: 0 16px 40px rgba(25, 54, 88, .1);
}

.hw-item.is-today {
	border-color: #bbf7d0;
	box-shadow: 0 10px 32px rgba(22, 163, 74, .08);
}

.hw-item-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.hw-item-title {
	margin: 0;
	font-size: 17px;
	font-weight: 780;
	letter-spacing: -.2px;
	line-height: 1.45;
}

.hw-item-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 12.5px;
	color: var(--hw-muted);
}

.hw-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 650;
	background: #f1f5f9;
	color: #475569;
}

.hw-pill.is-date {
	background: #ecfdf5;
	color: #047857;
}

.hw-pill.is-done {
	background: #dcfce7;
	color: #15803d;
}

.hw-pill.is-wait {
	background: #eff6ff;
	color: #2563eb;
}

.hw-pill.is-late {
	background: #fef2f2;
	color: #b91c1c;
}

.hw-pill.is-soon {
	background: #fffbeb;
	color: #b45309;
}

.hw-item-desc {
	margin: 10px 0 0;
	color: #374151;
	font-size: 13.5px;
	line-height: 1.8;
}

.hw-item-desc p {
	margin: 0 0 6px;
}

.hw-item-desc p:last-child {
	margin-bottom: 0;
}

/* 已提交面板 */
.hw-done {
	margin: 12px 0 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: linear-gradient(180deg, #f6fdf9, #f0fdf4);
	border: 1px solid #bbf7d0;
	font-size: 13px;
	color: #374151;
}

.hw-done-top {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 4px;
}

.hw-done-top strong {
	color: #15803d;
	font-size: 13.5px;
}

.hw-done-top span {
	color: var(--hw-muted);
	font-size: 12.5px;
}

.hw-done-line {
	margin-top: 5px;
}

.hw-done-line b {
	color: #15803d;
}

.hw-fb {
	margin-top: 5px;
	color: #374151;
	white-space: pre-wrap;
	font-size: 12.5px;
	line-height: 1.75;
}

/* 只读提示 */
.hw-readonly {
	margin: 12px 0 0;
	font-size: 12.5px;
	color: #92400e;
	background: #fffbeb;
	border: 1px dashed #fcd34d;
	border-radius: 12px;
	padding: 8px 12px;
}

/* 提交区 */
.hw-submit {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed #e6edf6;
}

.hw-submit input[type="text"] {
	min-width: 200px;
	flex: 1 1 200px;
}

.hw-submit .hw-hint {
	font-size: 12px;
	color: #94a3b8;
	flex-basis: 100%;
}

/* ---------------------------------------------------------------- 题目区 */
.hw-task {
	margin: 14px 0 4px;
}

.hw-task-tags {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.hw-tag {
	font-size: 12px;
	font-weight: 650;
	border-radius: 999px;
	padding: 3px 11px;
}

.hw-tag.is-obj {
	background: #eff6ff;
	color: #1d4ed8;
}

.hw-tag.is-code {
	background: #fef3c7;
	color: #b45309;
}

.hw-tag.is-score {
	background: #f0fdf4;
	color: #15803d;
}

.hw-q {
	border: 1px solid #e8eff9;
	border-radius: 16px;
	padding: 14px 16px;
	margin-bottom: 10px;
	background: #fcfdff;
}

.hw-q-head {
	display: flex;
	gap: 8px;
	align-items: baseline;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.hw-q-head strong {
	font-size: 14px;
	font-weight: 750;
}

.hw-q-type {
	font-size: 11.5px;
	color: #4f46e5;
	background: #eef2ff;
	border-radius: 6px;
	padding: 1px 7px;
}

.hw-q-pts {
	font-size: 11.5px;
	color: var(--hw-muted);
}

.hw-q-judge {
	font-size: 12px;
	font-weight: 700;
}

.hw-q-judge.is-right {
	color: #15803d;
}

.hw-q-judge.is-wrong {
	color: #b91c1c;
}

.hw-stem {
	font-size: 14px;
	line-height: 1.8;
	color: #111827;
	margin-bottom: 10px;
	overflow-wrap: anywhere;
}

.hw-opts {
	display: grid;
	gap: 7px;
}

.hw-opt {
	display: flex;
	gap: 9px;
	align-items: flex-start;
	font-size: 13.5px;
	line-height: 1.65;
	padding: 8px 12px;
	border: 1px solid #e8eef7;
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	transition: border-color .14s ease, background .14s ease;
}

.hw-opt:hover {
	border-color: #bfdbfe;
	background: #f8fbff;
}

.hw-opt.is-on {
	border-color: #34d399;
	background: #f0fdf4;
}

.hw-opt input {
	margin-top: 4px;
}

.hw-opt span {
	flex: 1;
	min-width: 0;
	word-break: break-word;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
}

.hw-tf {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.hw-tip-note {
	font-size: 12px;
	color: var(--hw-muted);
	margin: 7px 0 0;
}

.hw-hint-btn {
	border: 1px solid #fcd34d;
	background: #fffbeb;
	color: #b45309;
	border-radius: 999px;
	padding: 4px 13px;
	font-size: 12.5px;
	font-weight: 650;
	cursor: pointer;
}

.hw-hint-box {
	margin-top: 8px;
	padding: 10px 13px;
	border-left: 3px solid #fbbf24;
	background: #fffbeb;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.75;
	color: #78350f;
}

.hw-code {
	width: 100%;
	font-family: Consolas, Monaco, monospace;
	font-size: 13px;
	line-height: 1.7;
	padding: 12px 14px;
	border: 1px solid #dbe6f3;
	border-radius: 12px;
	background: #fbfdff;
	resize: vertical;
}

.hw-code.is-text {
	font-family: inherit;
}

.hw-ref {
	font-size: 12px;
	color: var(--hw-muted);
	margin: 8px 0 0;
	background: #f8fafc;
	border-left: 3px solid #cbd5e1;
	border-radius: 8px;
	padding: 7px 11px;
	white-space: pre-wrap;
}

.hw-grade {
	margin-top: 10px;
	padding: 11px 13px;
	border-radius: 12px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	font-size: 13px;
}

.hw-grade strong {
	color: #15803d;
}

.hw-wait {
	font-size: 12.5px;
	color: #b45309;
	margin: 8px 0 0;
}

/* ---------------------------------------------------------------- 空态 / 登录墙 */
.hw-empty {
	text-align: center;
	padding: 46px 20px;
	background: #fff;
	border: 1px dashed #dbe6f3;
	border-radius: 22px;
	color: var(--hw-muted);
	font-size: 14px;
}

.hw-empty .ico {
	font-size: 34px;
	display: block;
	margin-bottom: 10px;
}

.hw-gate {
	max-width: 560px;
	margin: 20px auto;
	padding: 30px 28px;
	background: #fff;
	border: 1px solid var(--hw-line);
	border-radius: 22px;
	box-shadow: 0 12px 40px rgba(25, 54, 88, .08);
	text-align: center;
}

.hw-gate h2 {
	margin: 0 0 8px;
	font-size: 22px;
	letter-spacing: -.5px;
}

.hw-gate p {
	margin: 0 0 18px;
	color: var(--hw-muted);
	font-size: 14px;
}

/* ---------------------------------------------------------------- 手机 */
@media (max-width: 640px) {
	.hw-card,
	.hw-item {
		padding: 15px 15px;
		border-radius: 18px;
	}

	.hw-hero {
		padding-bottom: 18px;
	}

	.hw-hero h1 {
		font-size: 30px;
		letter-spacing: -.9px;
	}

	.hw-item-title {
		font-size: 15.5px;
	}

	.hw-rank-row {
		gap: 7px;
		padding: 7px 9px;
		font-size: 13px;
	}

	.hw-rank-row .obj,
	.hw-rank-row .code {
		min-width: 34px;
	}

	.hw-submit input[type="text"] {
		flex-basis: 100%;
		min-width: 0;
	}

	.hw-btn,
	.akc-hw-page .button,
	.akc-hw-page .button-primary {
		padding: 9px 15px;
	}
}

/* ---------------- 今日排行榜分班切换 ---------------- */
.hw-rank-head {
	align-items: center;
}

.hw-rank-head .lb-tabs {
	margin-left: auto;
}

.hw-rank-sub {
	margin: 0 0 8px;
	font-size: 12px;
	color: var(--hw-muted);
}

.hw-rank-empty {
	padding: 14px 4px;
	text-align: center;
	font-size: 12.5px;
	color: var(--hw-muted);
	background: #f8fafc;
	border-radius: 12px;
}

@media (max-width: 560px) {
	.hw-rank-head .lb-tabs {
		margin-left: 0;
		width: 100%;
	}
}
