/* /spell — madi.css 위에 진단 표시만 더한다 */
.marked {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.9rem 1rem;
  font-size: 1.05rem; line-height: 2; white-space: pre-wrap;
}
.marked mark {
  background: transparent; color: inherit; cursor: pointer; border-radius: 3px; padding: 0 1px;
  text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 5px;
}
.marked mark.error { text-decoration-color: var(--sev-error); background: var(--sev-error-bg); }
.marked mark.warn { text-decoration-color: var(--sev-warn); text-decoration-style: wavy; }
.marked mark.suggest { text-decoration-color: var(--sev-suggest); text-decoration-style: dotted; }
.marked mark:hover, .marked mark.on { outline: 1px solid currentColor; }
.marked .sp { display: inline-block; min-width: 0.45em; }

.summary { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; font-size: var(--step--1); color: var(--muted); align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 0.3rem; }
.pill i { width: 0.65rem; height: 0.65rem; border-radius: 50%; display: inline-block; }
.pill.error i { background: var(--sev-error); }
.pill.warn i { background: var(--sev-warn); }
.pill.suggest i { background: var(--sev-suggest); }

.diags { display: grid; gap: 0.55rem; padding: 0; margin: 0; list-style: none; }
.diag {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line);
  border-radius: 8px; padding: 0.65rem 0.9rem; display: grid; gap: 0.35rem; min-width: 0;
}
.diag.error { border-left-color: var(--sev-error); }
.diag.warn { border-left-color: var(--sev-warn); }
.diag.suggest { border-left-color: var(--sev-suggest); }
.diag.on { box-shadow: 0 0 0 2px var(--accent-soft); }
.diag .head { display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; align-items: baseline; }
.diag .sev { font-size: 0.75rem; font-weight: 600; padding: 0.05rem 0.45rem; border-radius: 4px; }
.diag.error .sev { color: var(--sev-error); background: var(--sev-error-bg); }
.diag.warn .sev { color: var(--sev-warn); background: var(--sev-warn-bg); }
.diag.suggest .sev { color: var(--sev-suggest); background: var(--sev-suggest-bg); }
.diag .src { font-family: var(--font-display); font-size: 1.05rem; }
.diag .arrow { color: var(--muted); }
.diag .msg { font-size: 0.93rem; }
.diag .rule { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-left: auto; }
.fixes { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.fixes button {
  font: inherit; font-family: var(--font-display); font-size: 1rem; cursor: pointer; border-radius: 6px;
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--ink); padding: 0.05rem 0.6rem;
}
.fixes button:hover { background: var(--accent); color: var(--bg); }
details.ref { font-size: 0.85rem; color: var(--muted); }
details.ref summary { cursor: pointer; }
details.ref div { margin-top: 0.3rem; padding: 0.5rem 0.7rem; background: var(--bg); border-radius: 6px; line-height: 1.6; }

.corrected { display: grid; gap: 0.5rem; }
.corrected .box { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem 1rem; white-space: pre-wrap; font-size: 1.02rem; }
.corrected .box { line-height: 1.9; }
.corrected ins.fix {
  text-decoration-line: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; cursor: pointer; border-radius: 3px;
}
.corrected ins.fix.error { text-decoration-color: var(--sev-error); }
.corrected ins.fix.warn { text-decoration-color: var(--sev-warn); }
.corrected ins.fix.suggest { text-decoration-color: var(--sev-suggest); }
.corrected ins.fix:hover, .corrected ins.fix.on { outline: 1px solid currentColor; }
.ok { background: var(--accent-soft); border-radius: 10px; padding: 0.8rem 1rem; }

/* 설명 쪽 (/spell/about) — 표 꼴은 소개 페이지와 같다 */
.doc { display: grid; gap: 2.2rem; }
.doc section { display: grid; gap: 0.75rem; }
.doc h2 { font-size: var(--step-2); }
.doc h3 { font-size: var(--step-0); font-family: var(--font-body); font-weight: 600; }
.doc p, .doc li { max-width: 44rem; }
.doc ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.25rem; }
.cols { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.cols > div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.8rem 1rem; display: grid; gap: 0.35rem; align-content: start; min-width: 0; }
.cols p { color: var(--muted); font-size: 0.93rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; font-variant-numeric: tabular-nums; }
th, td { padding: 0.45rem 0.7rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
thead th { font-weight: 500; color: var(--muted); font-size: 0.78rem; vertical-align: bottom; white-space: normal; }
tbody tr:last-child td { border-bottom: 0; }
tr.madi td { background: var(--accent-soft); }
tr.madi td:first-child { font-weight: 600; }
.notes { display: grid; gap: 0.35rem; font-size: 0.88rem; color: var(--muted); padding-left: 1.2rem; margin: 0; }
.cmd { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.9rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.86rem; white-space: pre; }
