/*
 * DIY hub. 绛红纸金 tokens only; no colour is written literally here that is not a var().
 *
 * PRINT IS A DELIVERABLE (§8), not an afterthought — the print block at the bottom is as
 * considered as the screen styles. Parents print things, and this page should print as a paper
 * checklist a parent can carry into a conversation.
 */

.diy { background: var(--paper); color: var(--ink); }
.diy .wrap { max-width: 820px; margin: 0 auto; padding: 28px 18px 80px; }

.diy-head h1 { font-size: 24px; margin: 0 0 8px; color: var(--red); }
.diy-head .lede { font-size: 16px; color: var(--ink2); margin: 0 0 18px; }

.stages { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.stages .chip {
	display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 99px;
	background: var(--card); color: var(--ink); text-decoration: none; font-size: 14px;
	min-height: 44px; line-height: 30px; /* 44px touch target per §7 */
}
.stages .chip.on { background: var(--red); color: #fff; border-color: var(--red); }
.stages .chip:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }

.progress { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink2); margin: 0 0 14px; }
.progress .pring { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--line); }

.nogate, .fine { font-size: 12.5px; color: var(--ink2); }
.nogate { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--brass); padding: 9px 12px; margin: 0 0 22px; }
.note { background: var(--card); border: 1px solid var(--line); padding: 12px; font-size: 14px; color: var(--ink2); }

.phase { margin: 0 0 18px; }
.phase > details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.phase summary { cursor: pointer; padding: 12px 14px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.phase summary::-webkit-details-marker { display: none; }
.phase summary h2 { font-size: 17px; margin: 0; color: var(--red); display: flex; gap: 8px; align-items: baseline; }
.phase summary .when { font-size: 12.5px; color: var(--ink2); font-weight: 400; }
.phase summary .count { font-size: 12.5px; color: var(--ink2); white-space: nowrap; }
.phase summary:focus-visible { outline: 2px solid var(--brass); outline-offset: -2px; }

.items { list-style: none; margin: 0; padding: 0 14px 14px; }
.item { border-top: 1px dashed var(--line); padding: 14px 0; }
.item:first-child { border-top: 0; }

.item .head { display: flex; gap: 10px; align-items: flex-start; }
.item .head input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; }
.item .head label { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; min-height: 24px; }
.item .title { font-weight: 600; font-size: 15.5px; }
.item .timing { font-size: 12.5px; color: var(--brass-ink); border: 1px solid var(--brass); border-radius: 99px; padding: 0 7px; }
.item .head input:focus-visible + label { outline: 2px solid var(--brass); outline-offset: 2px; }
.item.done .title { color: var(--ink2); text-decoration: line-through; }

.item .summary { margin: 6px 0 0 30px; font-size: 14.5px; color: var(--ink); }

.how { margin: 8px 0 0 30px; }
.how > summary { cursor: pointer; font-size: 13px; color: var(--brass-ink); padding: 2px 0; }
.how > p { font-size: 14px; color: var(--ink2); margin: 6px 0 0; }

.diag { margin: 10px 0 0 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.diag-lede { font-size: 12.5px; color: var(--ink2); margin: 0 0 8px; }
.dq { border: 0; margin: 0 0 8px; padding: 0; }
.dq legend { font-size: 13.5px; color: var(--ink); padding: 0 0 4px; }
.dq .opt { display: inline-flex; align-items: center; gap: 5px; margin: 0 12px 4px 0; }
.dq input[type="radio"] { width: 18px; height: 18px; }
.dq label { font-size: 13.5px; color: var(--ink2); cursor: pointer; }
.dq input:focus-visible + label { outline: 2px solid var(--brass); outline-offset: 2px; }

.guide { margin: 8px 0 0; padding: 9px 11px; background: var(--card); border-left: 3px solid var(--red); font-size: 14px; }
.guide-notes { margin: 6px 0 0; font-size: 13px; color: var(--ink2); }
.guide-notes p { margin: 4px 0 0; padding-left: 11px; border-left: 2px solid var(--line); }

.links { margin: 8px 0 0 30px; font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; }
.links a { color: var(--red); }

.cta { margin: 26px 0 0; background: var(--card); border: 1px solid var(--brass); border-radius: 8px; padding: 16px 18px; }
.cta h2 { font-size: 17px; margin: 0 0 6px; color: var(--red); }
.cta p { font-size: 14px; color: var(--ink2); margin: 0 0 8px; }
.ctalinks { display: flex; gap: 12px; }
.ctalinks a { color: var(--red); font-weight: 600; }

.corrections { margin: 18px 0 0; font-size: 13px; color: var(--ink2); }
.clear-wrap { margin: 14px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#diy-clear { font: inherit; font-size: 13px; color: var(--red); background: none; border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; cursor: pointer; min-height: 40px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------------------
 * PRINT — a paper checklist (§8), not a screenshot of a web page.
 *
 * Expanded tips are omitted by default: the paper artifact is the LIST, and a
 * parent carrying it wants to see every step at once rather than four pages of
 * guidance. `.print-tips` on <html> restores them, which is what the 「打印含说明版」
 * control sets.
 *
 * Checkboxes become empty squares because a printed checkbox is meant to be
 * ticked with a pen, and a rendered tick would be a claim about someone's
 * progress on a sheet of paper they have not filled in yet.
 * --------------------------------------------------------------------------- */
@media print {
	.diy { background: #fff; }
	.diy .wrap { max-width: none; padding: 0; }

	.stages, .progress, .nogate, .clear-wrap, .cta, .corrections, .diag { display: none; }
	.how { display: none; }
	html.print-tips .how { display: block; }
	html.print-tips .how > summary { display: none; }

	.phase > details { border: 0; }
	.phase summary { padding: 0; border-bottom: 1px solid #000; margin: 12pt 0 6pt; }
	.phase summary .count { display: none; }
	.items { padding: 0; }

	/* A phase or an item must not be split across a page break — half a step is a
	   step somebody skips. */
	.phase, .item { break-inside: avoid; page-break-inside: avoid; }

	.item { border-top: 0; padding: 4pt 0; }
	.item .head input[type="checkbox"] {
		appearance: none; -webkit-appearance: none;
		width: 10pt; height: 10pt; border: 1pt solid #000; border-radius: 0; background: #fff;
	}
	.item.done .title { text-decoration: none; color: #000; }
	.item .summary { margin-left: 18pt; font-size: 9.5pt; }
	.links { display: none; }

	/* The print footer carries the URL and the standing caveat, because a printed
	   page that has left the site still needs to say where it came from and that
	   the school's own page governs. */
	.wrap::after {
		content: "lia.us/diy/ · LIA 留学情报局 · 以官方页面为准";
		display: block; margin-top: 14pt; padding-top: 6pt;
		border-top: 1pt solid #000; font-size: 8.5pt;
	}
}
