/*! CSS Portal — Case Converter (builds on code-tool.css) */
.cc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.cc [hidden] { display: none !important; }
.cc span, .cc small { line-height: inherit; }

.cc-text {
	display: block; width: 100%; min-height: 220px; height: clamp(220px, 32vh, 380px); margin: 0; padding: 14px 16px;
	border: 0; outline: 0; resize: vertical; background: var(--ct-bg); color: var(--ct-text);
	font: 15px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: normal;
	white-space: pre-wrap; overflow-wrap: anywhere; box-sizing: border-box;
}
.cc-text::placeholder { color: var(--ct-muted); opacity: .8; }
.cc-text[readonly] { background: var(--ct-surface); }
.cc-pane--code .cc-text { font: 14px/1.65 var(--ct-mono); }

/* case buttons */
.cc-picker { display: grid; gap: 14px; }
.cc-group { display: grid; gap: 8px; }
.cc-group__label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ct-muted); }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cc-case {
	display: grid; gap: 3px; min-width: 0; padding: 10px 12px; margin: 0; text-align: left; cursor: pointer;
	background: var(--ct-bg); color: var(--ct-text); border: 1px solid var(--ct-border); border-radius: 10px;
	font: inherit; transition: border-color .15s, background .15s, box-shadow .15s;
}
.cc-case:hover { border-color: var(--ct-border-strong); background: var(--ct-surface); }
.cc-case:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ct-accent-soft); border-color: var(--ct-accent); }
.cc-case.is-active { border-color: var(--ct-accent); background: var(--ct-accent-soft); box-shadow: inset 0 0 0 1px var(--ct-accent); }
.cc-case__name { font-size: 14px; font-weight: 600; }
.cc-case__ex { font: 12.5px/1.4 var(--ct-mono); color: var(--ct-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-case.is-active .cc-case__ex { color: var(--ct-accent); }

.cc-options { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; min-height: 22px; }
.cc-options:not(:has(label:not([hidden]))) { display: none; }
.cc .ct-pane__title b { font-weight: 700; }
.cc .ct-status:empty { display: none; }

@media (max-width: 640px) {
	.cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.cc-case { padding: 9px 10px; }
	.cc-case__name { font-size: 13px; }
	.cc-case__ex { font-size: 11.5px; }
}

/* reference table and about cards */
.cc-ref-wrap { margin: 24px 0; overflow-x: auto; border: 1px solid var(--ct-border); border-radius: var(--ct-radius); }
.cc-ref { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.cc-ref th { padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ct-muted); background: var(--ct-surface); border-bottom: 1px solid var(--ct-border); }
.cc-ref td { padding: 9px 14px; vertical-align: top; border-bottom: 1px solid var(--ct-border); color: var(--ct-text); }
.cc-ref tr:last-child td { border-bottom: 0; }
.cc-ref td:nth-child(-n+2) { font-family: var(--ct-mono); font-size: 13.5px; white-space: nowrap; }
.cc-ref td:first-child { font-weight: 600; }
.cc-about { margin: 24px 0; }
.cc-about h3 { margin: 0 0 14px; }
.cc-about__cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cc-acard { padding: 18px 20px; background: var(--ct-bg); border: 1px solid var(--ct-border); border-radius: var(--ct-radius); }
.cc-acard__title { margin-bottom: 8px; font-size: 16px; font-weight: 700; color: var(--ct-text); }
.cc-acard p { margin: 0; font-size: 14.5px; line-height: 1.65; }
.cc-acard code { font-family: var(--ct-mono); font-size: .9em; padding: 1px 5px; border-radius: 5px; background: var(--ct-surface-2); }
@media (max-width: 640px) {
	.cc-about__cards { grid-template-columns: minmax(0, 1fr); }
	.cc-ref thead { display: none; }
	.cc-ref, .cc-ref tbody, .cc-ref tr, .cc-ref td { display: block; }
	.cc-ref tr { padding: 10px 14px; border-bottom: 1px solid var(--ct-border); }
	.cc-ref tr:last-child { border-bottom: 0; }
	.cc-ref td { padding: 1px 0; border: 0; }
	.cc-ref td:nth-child(-n+2) { white-space: normal; }
	.cc-ref td:nth-child(2) { color: var(--ct-muted); }
}
