/* Sentence Detective — a case file; the sentence reads like a sentence. */
.dxg .sd { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; padding: clamp(8px, 1.6vh, 18px) clamp(10px, 2.4vw, 28px); overflow-y: auto; }
.sd-file {
	position: relative; width: min(100%, 860px); display: flex; flex-direction: column; gap: clamp(8px, 1.6vh, 14px);
	padding: 18px clamp(16px, 3vw, 34px) 20px; border-radius: 6px 18px 18px 18px; background: #fff; border: 2px solid var(--g-border);
	box-shadow: 0 6px 18px rgba(28, 43, 61, .07); border-top: 10px solid #F6D878;
	background-image: repeating-linear-gradient(transparent 0 38px, rgba(157, 211, 218, .12) 38px 39px);
}
.sd-tab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sd-glass { font-size: 1.3rem; }
.sd-case { font-family: var(--g-head); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .95rem; color: #5C4500; }
.sd-skill { font-family: var(--g-head); font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: #DDF2F0; color: #0E4A49; }
.sd-clue { margin-left: auto; min-height: 36px; font-size: .9rem; padding: 0 14px; }
.sd-task { margin: 0; font-family: var(--g-head); font-weight: 500; font-size: 1.15rem; color: var(--g-blue); }
/* The sentence: generous size and spacing; words are quiet until hovered or focused */
.sd-sentence { margin: 0; font-family: var(--g-body); font-weight: 700; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); line-height: 1.8; word-spacing: .12em; color: var(--g-navy); overflow-wrap: break-word; }
.sd-word { display: inline; margin: 0; padding: 0 .06em; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 6px;
	text-decoration: underline transparent 3px; text-underline-offset: .18em; transition: background-color .12s ease, text-decoration-color .12s ease; }
.sd-word:hover:not(:disabled) { background: #F0FAF8; text-decoration-color: #9FD6D0; text-decoration-style: dotted; }
.sd-word:focus-visible { outline: 3px solid var(--g-blue); outline-offset: 2px; }
.sd-word:disabled { cursor: default; color: inherit; }
/* checked and fine: dotted underline (not color alone) */
.sd-word.is-cleared { text-decoration-color: #B9C8CA; text-decoration-style: dotted; }
/* the evidence: highlighter + solid coral underline + magnifier */
.sd-word.is-found { background: #FFF1B8; text-decoration-color: #E08B7A; text-decoration-style: solid; position: relative; }
.sd-word.is-found::after { content: "🔎"; font-size: .45em; vertical-align: super; margin-left: .15em; }
/* fixed: aqua double underline + ✓ */
.sd-word.is-fixed { background: #E2F5F3; text-decoration-color: var(--g-aqua); text-decoration-style: double; }
.sd-word.is-fixed::after { content: "✓"; font-size: .5em; vertical-align: super; color: var(--g-aqua-dark); margin-left: .1em; }
.sd-sentence.is-solved { animation: sd-settle .4s ease-out; }
@keyframes sd-settle { from { opacity: .4; } }
.sd-clue-text { margin: 0; padding: 8px 12px; border-radius: 12px; background: #FFF6D6; font-size: 1rem; line-height: 1.45; }
.sd-fixhead { margin: 0; font-family: var(--g-head); font-weight: 500; font-size: 1.2rem; }
.sd-evidence { padding: 0 .3em; border-radius: 6px; background: #FFF1B8; font-weight: 700; }
.sd-fix .dxq { gap: 10px; }
.sd-fix .dxq-choices { width: min(100%, 680px); }
.sd-fix .dxq-choice { min-height: 70px; font-family: var(--g-body); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.sd-solved { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.sd-rule { margin: 0; padding: 8px 14px; border-radius: 12px; background: #E2F5F3; border-left: 6px solid var(--g-aqua); font-size: 1.1rem; }
.sd-next { min-height: 52px; font-size: 1.1rem; }
.sd-msg { margin: 0; min-height: 1.4em; font-family: var(--g-head); font-weight: 500; color: var(--g-blue); }
.sd-streak { position: absolute; top: 10px; right: 14px; padding: 3px 12px; border-radius: 999px; background: #FFF5D1; border: 2px solid #E9C85A;
	font-family: var(--g-head); font-weight: 600; font-size: .9rem; color: #5C4500; opacity: 0; transition: opacity .2s; }
.sd-streak.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .sd-sentence.is-solved { animation: none; } }
@media (max-width: 599px) {
	.dxg .sd { align-items: flex-start; padding: 8px; }
	.sd-file { padding: 12px 12px 14px; }
	.sd-skill { display: none; }
	.sd-sentence { font-size: 1.45rem; line-height: 1.75; }
	.sd-fix .dxq-choices { grid-template-columns: 1fr; }
	.sd-fix .dxq-choices--3 .dxq-choice:last-child { grid-column: auto; }
	.sd-fix .dxq-choice { min-height: 54px; font-size: 1.4rem; }
	.sd-streak { top: 2px; right: 4px; font-size: .78rem; }
}
