/* Tavola chiara per matematica e risultati, navigazione comune agli editor. */
body.calculator { --bg: #0d0f14; --surf: #141720; --surf2: #1a1e2a; --surf3: #1f2435; --accent: #00d4ff; --text: #e8eaf0; background: var(--bg); color: var(--text); height: auto; min-height: 100dvh; padding: 16px; }
.calculator .container { max-width: 1480px; border-radius: 10px; box-shadow: none; }
.calculator #header { background: var(--surf); text-align: left; display: flex; }
.calculator .header h1 { font: 700 20px/1.2 var(--font-ui); margin: 0; }
.calculator .header p { font-size: 13px; color: var(--text2); margin-top: 4px; opacity: 1; }
.calculator .editor-brand { margin-right: 10px; }
.calculator .editor-note { margin-left: auto; }
.calculator .editor-load { border-radius: 8px; margin-bottom: 12px; }
.calculator .editor-menu-content { min-width: 180px; }
.calculator #header .btn { border: 1px solid var(--border); background: transparent; }
.calculator .content { padding: 24px; background: #edf2f7; color: #26354a; }
.calculator-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.calculator-input, .calculator-results { min-width: 0; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 20px; }
.calculator-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.calculator-panel-heading h2 { font-size: 16px; color: #172b4d; }
.calculator-panel-heading a { font-size: 13px; color: #006b83; text-underline-offset: 3px; }
.calculator-toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.calculator-toolbar .btn { border: 1px solid #bccbd9; color: #26354a; background: #fff; }
.calculator-toolbar .btn.primary { color: #07202a; background: var(--accent); border-color: var(--accent); }
.calculator-toolbar .btn-assistente { color: #006b83; border-color: #79b6c5; }
.calculator .esempi-select { min-height: 38px; width: auto; max-width: 100%; font-size: 13px; background: #fff; color: #26354a; border-color: #bccbd9; }
.calculator-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.calculator-hint { color: #526378; font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.calculator #expression { min-height: 330px; font: 15px/1.7 var(--font-dati); color: #172b4d; background: #f8fafc; padding: 16px; border-color: #b8c6d8; tab-size: 4; }
.calculator #expression::placeholder { color: #64748b; }
.calculator .wasm-result { margin-top: 0; border: 0; }
.calculator .wasm-result .var { font: 16px/1.7 var(--font-dati); border-radius: 6px; padding: 16px; }
.calculator .wasm-result .var button { font: 500 13px var(--font-ui); min-height: 36px; }
.calculator-empty { min-height: 270px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 24px; color: #526378; }
.calculator-empty strong { font-size: 18px; color: #26354a; margin-bottom: 10px; }
.calculator-empty p { max-width: 360px; line-height: 1.7; }
.calculator-messages { margin-top: 20px; border-top: 1px solid #cbd5e1; padding-top: 14px; }
.calculator-messages summary { cursor: pointer; font-size: 13px; font-weight: 600; color: #526378; }
.calculator-message-actions { margin-top: 14px; }
.calculator-message-actions .btn { color: #26354a; background: #fff; border: 1px solid #bccbd9; }
.calculator .output { margin-top: 10px; background: #111827; color: #dce5f1; font: 13px/1.6 var(--font-dati); white-space: pre-wrap; overflow-wrap: anywhere; }
.calculator .wasm-log { font: 13px/1.6 var(--font-dati); }
.calculator .log-toggle { font-size: 13px; min-height: 36px; margin-top: 12px; color: #526378; }
.calculator #grafico-box { color: #26354a; }
.calculator #grafico-box input, .calculator #grafico-box select { color: #26354a; font-size: 13px; }
.calculator #grafico-box button { min-height: 36px; font-size: 13px; }
.calculator #calcolo-locale-stato { font-size: 13px; color: var(--text2); }
.calculator #calcolo-locale-stato[data-stato="pronto"] { color: #7cff6b; }
.calculator #calcolo-locale-stato[data-stato="errore"] { color: #ffd866; }
.calculator .status-card { font-size: 14px; color: #26354a; padding: 14px 18px; }
.calculator .piede { color: #526378; padding: 18px 24px; }
.calculator .piede a { color: #006b83; }
.calculator .esempio-dialog { color: #26354a; line-height: 1.6; margin: auto; }
.calculator .esempio-codice, .calculator .assistente-codice { font: 13px/1.6 var(--font-dati); }
.calculator .esempio-dialog p + p { margin-top: 12px; }
.calculator .esempio-dialog button { min-height: 38px; font-size: 13px; }
.calculator .assistente-testa { background: #172b4d; }
.calculator .assistente-form textarea { color: #26354a; background: #fff; }
@media (max-width: 1040px) {
  .calculator-workspace { grid-template-columns: 1fr; }
  .calculator-empty { min-height: 160px; }
}
@media (max-width: 600px) {
  body.calculator { padding: 0; }
  .calculator .container { border-radius: 0; }
  .calculator .content { padding: 12px; }
  .calculator-input, .calculator-results { padding: 16px; }
  .calculator #expression { min-height: 280px; }
  .calculator .editor-note { margin-left: 0; }
  .calculator .piede { padding-bottom: 84px; }
}
