/* Componentes do conteúdo de Python (extraídos das páginas originais) */
.tip-grid{display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0;}
.tip-item{background: #f8fafc; padding: 20px; border-radius: 12px; text-align: center; border: 1px solid #e2e8f0;}
.tip-item .tip-icon{font-size: 2em; margin-bottom: 10px;}
.tip-item strong{display: block; margin-bottom: 5px; color: var(--primary);}
.tip-item span{font-size: 0.9em; color: #718096;}
.example-grid{display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 15px; margin: 20px 0;}
.example-item{background: #f8fafc; padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0; transition: all 0.3s;}
.example-item:hover{border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.08);}
.example-item .ex-icon{font-size: 2em; margin-bottom: 10px;}
.example-item strong{display: block; margin-bottom: 5px; color: var(--primary);}
.example-item span{font-size: 0.9em; color: #718096; line-height: 1.5;}
.compare-grid{display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0;}
.compare-item{padding: 20px; border-radius: 12px; border: 1px solid #e2e8f0;}
.compare-item.python-side{background: rgba(48,105,152,0.05); border-color: var(--primary);}
.compare-item.other-side{background: #f8fafc;}
.compare-item strong{display: block; margin-bottom: 10px; font-size: 1.05em;}
.compare-item code{font-family: 'Consolas', monospace; font-size: 0.9em; display: block; white-space: pre;}
.feature-list{display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 20px 0;}
.feature-item{background: #f8fafc; padding: 20px; border-radius: 12px; text-align: center; border: 1px solid #e2e8f0;}
.feature-item .feat-icon{font-size: 2em; margin-bottom: 10px;}
.feature-item strong{display: block; margin-bottom: 5px; color: var(--primary);}
.feature-item span{font-size: 0.9em; color: #718096;}
.compare-grid{grid-template-columns: 1fr;}
.step-list{counter-reset: steps; list-style: none; margin: 15px 0; padding: 0;}
.anatomy-box{background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 12px; padding: 25px; margin: 20px 0; text-align: center;}
.anatomy-box code{font-size: 1.4em; letter-spacing: 2px;}
.anatomy-box .labels{display: flex; justify-content: center; gap: 30px; margin-top: 15px; flex-wrap: wrap;}
.anatomy-box .label-item{font-size: 0.85em; color: #718096;}
.anatomy-box .label-item strong{color: var(--primary); display: block;}
.op-table{width: 100%; border-collapse: collapse; margin: 15px 0;}
.op-table th, .op-table td{padding: 12px 16px; text-align: left; border-bottom: 1px solid #e2e8f0;}
.op-table th{background: #f8fafc; color: var(--primary); font-weight: 600;}
.op-table td:first-child{font-family: 'Consolas', monospace; font-weight: 600;}
.op-table tr:hover{background: rgba(48,105,152,0.03);}
.op-table th, .op-table td{padding: 10px 14px; text-align: left; border-bottom: 1px solid #e2e8f0;}
.op-table .valid{color: #38b000; font-weight: 600;}
.op-table .invalid{color: #e53e3e; font-weight: 600;}
.op-table th, .op-table td{padding: 10px 14px; text-align: center; border-bottom: 1px solid #e2e8f0;}
.truth-tables{display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 20px 0;}
.truth-table{border-collapse: collapse; width: 100%;}
.truth-table caption{font-weight: 700; color: var(--primary); margin-bottom: 8px; font-size: 1.05em;}
.truth-table th, .truth-table td{padding: 8px 12px; text-align: center; border: 1px solid #e2e8f0;}
.truth-table th{background: #f8fafc; color: var(--primary); font-weight: 600;}
.truth-table .t{color: #38b000; font-weight: 600;}
.truth-table .f{color: #e53e3e; font-weight: 600;}
.exercise-table{width: 100%; border-collapse: collapse; margin: 10px 0;}
.exercise-table th, .exercise-table td{padding: 8px 12px; text-align: left; border-bottom: 1px solid #bbf7d0; font-family: 'Consolas', monospace;}
.exercise-table th{background: #dcfce7; color: #166534; font-weight: 600; font-family: 'Segoe UI', sans-serif;}
.string-visual{background: #f8fafc; border: 2px solid #e2e8f0; border-radius: 12px; padding: 20px; margin: 15px 0; text-align: center; overflow-x: auto;}
.string-visual .pyboxes{display: inline-flex; gap: 0;}
.string-visual .pybox{width: 40px; height: 45px; border: 2px solid var(--primary); display: flex; align-items: center; justify-content: center; font-family: 'Consolas', monospace; font-size: 1.1em; font-weight: 600; background: white;}
.string-visual .indices{display: inline-flex; gap: 0; margin-top: 5px;}
.string-visual .idx{width: 40px; text-align: center; font-size: 0.8em; color: #718096;}
.op-table td:first-child{font-family: 'Consolas', monospace;}
.trace-table{width: 100%; border-collapse: collapse; margin: 15px 0;}
.trace-table th, .trace-table td{padding: 10px 16px; text-align: center; border: 1px solid #e2e8f0; font-family: 'Consolas', monospace;}
.trace-table th{background: var(--primary); color: white; font-family: 'Segoe UI', sans-serif;}
.trace-table .line-num{background: #f8fafc; color: #718096; font-weight: 600;}
.trace-table tr:nth-child(even){background: #f8fafc;}
.circle{display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: white; font-size: 0.7em; font-weight: 700; margin-left: 4px;}
.op-table th, .op-table td{padding: 10px 14px; border-bottom: 1px solid #e2e8f0;}
.op-table th{background: #f8fafc; color: var(--primary); font-weight: 600; text-align: center;}
.op-table td{text-align: center;}
.method-table{width: 100%; border-collapse: collapse; margin: 15px 0; font-size: 0.9em;}
.method-table th{background: #7c3aed; color: white; padding: 10px 14px; text-align: left;}
.method-table td{padding: 9px 14px; border-bottom: 1px solid #e2e8f0; vertical-align: top;}
.method-table tr:nth-child(even) td{background: #f8f7ff;}
.method-table code{background: #ede9fe; padding: 2px 6px; border-radius: 4px; font-family: 'Consolas', monospace; color: #5b21b6;}
.format-table{width: 100%; border-collapse: collapse; margin: 15px 0; font-size: 0.88em;}
.format-table th{background: #7c3aed; color: white; padding: 10px 14px; text-align: left;}
.format-table td{padding: 8px 14px; border-bottom: 1px solid #e2e8f0; font-family: 'Consolas', monospace;}
.format-table tr:nth-child(even) td{background: #f8f7ff;}
.format-table td:first-child{color: #7c3aed; font-weight: 600;}
.warn-box{background: #fff7ed; border: 2px solid #fed7aa; border-radius: 12px; padding: 20px 25px; margin: 20px 0;}
.warn-box p{margin-bottom: 0; color: #92400e;}
.recursion-diagram{display: flex; flex-direction: column; gap: 4px; margin: 15px 0; padding: 20px; background: #f8fafc; border-radius: 12px; font-family: 'Consolas', monospace; font-size: 0.9em;}
.recursion-diagram .call{color: #059669;}
.recursion-diagram .ret{color: #7c3aed;}
.method-table{width: 100%; border-collapse: collapse; margin: 15px 0; font-size: 0.88em;}
.method-table th{background: #059669; color: white; padding: 10px 14px; text-align: left;}
.method-table td{padding: 8px 14px; border-bottom: 1px solid #e2e8f0;}
.method-table tr:nth-child(even) td{background: #f0fdf4;}
.method-table td:first-child{font-family: 'Consolas', monospace; color: #059669; font-weight: 600;}
/* Código */
pre.py{padding-top:30px}
pre.py .pylab{position:absolute;top:6px;left:14px;font-size:12px;color:#94a3b8;font-family:"Segoe UI",system-ui,sans-serif}
pre.py .pyrun{position:absolute;top:8px;right:76px;background:#334155;color:#fff;border-radius:8px;padding:4px 10px;font-size:12px;text-decoration:none;font-family:"Segoe UI",system-ui,sans-serif}
pre.py .keyword{color:#c084fc}pre.py .function{color:#93c5fd}pre.py .string{color:#86efac}pre.py .comment{color:#94a3b8;font-style:italic}
pre.py .output{color:#fbbf24}pre.py .placeholder{color:#fb923c;font-style:italic}pre.py .prompt{color:#64748b}pre.py .number{color:#fca5a5}
pre.py .user-input{color:#5eead4}pre.py .error{color:#f87171}
h4.pyh{font-size:19px;margin:22px 0 8px}
.sec-sub{color:var(--suave);font-style:italic;margin-top:-6px}
/* Modo escuro */
html[data-theme=dark] .tip-item,html[data-theme=dark] .example-item,html[data-theme=dark] .feature-item,html[data-theme=dark] .compare-item,html[data-theme=dark] .anatomy-box,html[data-theme=dark] .string-visual,html[data-theme=dark] .recursion-diagram,html[data-theme=dark] .step-list li{background:#17201f!important;color:var(--texto)!important;border-color:var(--borda)!important}
html[data-theme=dark] .op-table td,html[data-theme=dark] .truth-table td,html[data-theme=dark] .trace-table td,html[data-theme=dark] .method-table td,html[data-theme=dark] .format-table td,html[data-theme=dark] .exercise-table td{background:#17201f!important;color:var(--texto)!important}
html[data-theme=dark] .op-table th,html[data-theme=dark] .truth-table th,html[data-theme=dark] .trace-table th,html[data-theme=dark] .method-table th,html[data-theme=dark] .format-table th,html[data-theme=dark] .exercise-table th{background:#1f3a25!important;color:#a5d6a7!important}
html[data-theme=dark] .compare-item code{background:#0f172a;color:#e2e8f0}
.tw-bar{height:14px;background:rgba(128,128,128,.25);border-radius:999px;overflow:hidden;margin:10px 0}
#twFill{height:100%;width:0;background:var(--cc);border-radius:999px;transition:width .2s}
.mt-q{border:2px solid var(--borda);border-radius:14px;padding:14px 18px;font-size:18px;margin:10px 0;min-height:60px}
@media (max-width:700px){.compare-grid{grid-template-columns:1fr!important}.compare-item code{display:block;overflow-x:auto;max-width:100%}
.op-table,.truth-table,.trace-table,.method-table,.format-table,.exercise-table{display:block;overflow-x:auto;max-width:100%}.string-visual,.recursion-diagram,.anatomy-box{overflow-x:auto}}
.compare-grid>*,.example-grid>*,.feature-list>*,.tip-grid>*{min-width:0}.compare-item code{white-space:pre}
.repl{background:#0f172a;color:#e2e8f0;border-radius:12px;padding:12px 14px;font-family:Consolas,"Courier New",monospace;font-size:15px;line-height:1.5}
.repl .out{white-space:pre-wrap;max-height:240px;overflow:auto;word-break:break-word;min-height:48px}
.repl .out .e{color:#f87171}.repl .out .o{color:#fbbf24}.repl .out .c{color:#94a3b8}
.rpl{display:flex;gap:6px;align-items:center}.rpl span{color:#86efac}
.rpl input{flex:1;background:transparent;border:0;color:#e2e8f0;font:inherit;outline:0;padding:2px 0;min-width:80px}
.shelf{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0}
.shelf span{background:rgba(48,105,152,.14);border:2px solid var(--c1);border-radius:10px;padding:4px 10px;font-family:Consolas,monospace;font-size:14.5px}
.shelf em{font-style:normal;color:var(--suave);font-size:14px;align-self:center}
.sugs{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 0}
.sugs button{font-family:Consolas,monospace!important}
