/* Cipher Decoder & Identifier — scoped.
   Inputs, labels, buttons and messages come from the shared .ftb-tool block in
   core.css so every tool looks like one product. Only cipher-specific layout
   lives here. */

.ftb-tool-cipher textarea{min-height:150px;font-family:var(--ftb-mono);
	font-size:var(--ftb-text-code);line-height:1.6;overflow-wrap:anywhere}

.ftb-tool-cipher .ftb-cd-settings{display:grid;gap:var(--ftb-space-4);
	grid-template-columns:1fr;margin-bottom:var(--ftb-space-5)}
@media (min-width:768px){
	.ftb-tool-cipher .ftb-cd-settings{grid-template-columns:2fr 1fr 1fr;align-items:end}
}
.ftb-tool-cipher .ftb-cd-settings .ftb-field{margin-bottom:0}

.ftb-cd-h{margin:0 0 var(--ftb-space-4);font-size:var(--ftb-text-lg);
	font-weight:var(--ftb-fw-semi);line-height:var(--ftb-lh-tight);
	letter-spacing:var(--ftb-ls-tight)}
.ftb-cd-used{font-size:var(--ftb-text-sm);font-weight:var(--ftb-fw-medium);
	color:var(--ftb-text-muted)}
.ftb-cd-note{margin:0 0 var(--ftb-space-4);font-size:var(--ftb-text-sm);
	color:var(--ftb-text-muted);line-height:var(--ftb-lh-snug)}

/* ---- What it looks like: the identifier, the reason this tool exists ---- */
.ftb-cd-ident{margin-bottom:var(--ftb-space-6);padding:var(--ftb-space-5);
	background:var(--ftb-surface);border:1px solid var(--ftb-border);
	border-radius:var(--ftb-radius);
	/* Reserved so the result appearing never shifts the page (§10 CLS). */
	min-height:150px}
.ftb-cd-cands{margin:0;padding:0;list-style:none}
.ftb-cd-cands li{padding:var(--ftb-space-3) 0;
	border-bottom:1px solid var(--ftb-border)}
.ftb-cd-cands li:last-child{border-bottom:0;padding-bottom:0}
.ftb-cd-cand-head{display:flex;flex-wrap:wrap;align-items:baseline;
	gap:var(--ftb-space-3)}
.ftb-cd-cands li.is-best .ftb-cd-cand-head strong{color:var(--ftb-primary)}
.ftb-cd-conf{font-size:var(--ftb-text-xs);font-weight:var(--ftb-fw-semi);
	padding:2px 10px;border-radius:var(--ftb-radius-full);
	background:var(--ftb-surface-2);color:var(--ftb-text-muted)}
.ftb-cd-cands li.is-best .ftb-cd-conf{background:var(--ftb-primary-soft);
	color:var(--ftb-primary)}
.ftb-cd-why{margin:var(--ftb-space-2) 0 0;font-size:var(--ftb-text-sm);
	color:var(--ftb-text-muted);line-height:var(--ftb-lh-snug)}
.ftb-cd-stats{margin:var(--ftb-space-4) 0 0;font-size:var(--ftb-text-xs);
	color:var(--ftb-text-subtle);line-height:var(--ftb-lh-snug)}

/* ---- Decoded output ---- */
.ftb-cd-out{margin-bottom:var(--ftb-space-6)}
.ftb-tool-cipher .ftb-cd-out textarea{min-height:110px;background:var(--ftb-surface)}

/* ---- All 25 shifts ---- */
.ftb-cd-rots{margin-bottom:var(--ftb-space-6)}
.ftb-cd-table{width:100%;border-collapse:collapse;font-size:var(--ftb-text-sm)}
.ftb-cd-table th,.ftb-cd-table td{padding:var(--ftb-space-2) var(--ftb-space-3);
	text-align:left;border-bottom:1px solid var(--ftb-border);vertical-align:top}
.ftb-cd-table th{font-weight:var(--ftb-fw-semi);background:var(--ftb-surface-2);
	white-space:nowrap}
.ftb-cd-table code{font-family:var(--ftb-mono);font-size:var(--ftb-text-code);
	overflow-wrap:anywhere}
.ftb-cd-shiftcell{white-space:nowrap;font-weight:var(--ftb-fw-semi);
	font-variant-numeric:tabular-nums}
/* The best row carries a left border as well as a tint, so it is still marked
   for anyone who cannot separate the two backgrounds (§9: never colour alone). */
.ftb-cd-table tr.is-best{background:var(--ftb-success-soft)}
.ftb-cd-table tr.is-best .ftb-cd-shiftcell{box-shadow:inset 3px 0 0 var(--ftb-success)}
.ftb-cd-copyrow{min-height:var(--ftb-tap);min-width:var(--ftb-tap);
	padding:var(--ftb-space-1) var(--ftb-space-3);font-family:inherit;
	font-size:var(--ftb-text-xs);font-weight:var(--ftb-fw-semi);
	color:var(--ftb-text);background:var(--ftb-bg);
	border:1px solid var(--ftb-border-strong);border-radius:var(--ftb-radius);
	cursor:pointer}
.ftb-cd-copyrow:hover{border-color:var(--ftb-primary);color:var(--ftb-primary)}
.ftb-cd-copyrow:focus-visible{outline:2px solid var(--ftb-primary);outline-offset:2px}
