/* ==========================================
   Guida HTML Forms - Stylesheet
   Base: Grid lesson + form-specific additions
   ========================================== */

/* Reset e Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #000;
  background: #fff;
  font-size: 18px;
}

/* Tipografia */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 40px;
  line-height: 1.2;
}

h2 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 80px;
  margin-bottom: 24px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 48px;
  margin-bottom: 16px;
}

p {
  margin-bottom: 20px;
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  border: 1px solid #e0e0e0;
}

pre {
  background: #f5f5f5;
  padding: 20px;
  border-radius: 4px;
  border: 1px solid #e0e0e0;
  overflow-x: auto;
  margin-bottom: 24px;
}

pre code {
  background: none;
  padding: 0;
  border: none;
  font-size: 14px;
  line-height: 1.5;
}

/* Note/Info Box */
.info-box {
  background: #f0f7ff;
  border-left: 3px solid #3b82f6;
  padding: 20px 24px;
  margin: 24px 0;
}

.info-box h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* Demo Container */
.demo-container {
  border: 2px solid #000;
  border-radius: 4px;
  margin: 32px 0;
  overflow: hidden;
}

.demo-controls {
  background: #f5f5f5;
  padding: 16px 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.demo-area {
  padding: 24px;
  min-height: 200px;
  position: relative;
}

/* Controlli UI */
.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-label {
  font-size: 13px;
  font-weight: 500;
  color: #333;
}

/* Toggle Buttons */
.toggle-group {
  display: flex;
  border: 1px solid #000;
  border-radius: 4px;
  overflow: hidden;
}

.toggle-btn {
  background: #fff;
  border: none;
  padding: 8px 16px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  border-right: 1px solid #000;
}

.toggle-btn:last-child {
  border-right: none;
}

.toggle-btn:hover {
  background: #f5f5f5;
}

.toggle-btn.active {
  background: #000;
  color: #fff;
}

/* Select Dropdown */
.demo-select {
  background: #fff;
  border: 1px solid #000;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  border-radius: 4px;
  min-width: 140px;
}

.demo-select:focus {
  outline: 2px solid #000;
  outline-offset: 2px;
}

/* Range Slider */
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 150px;
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #000;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #000;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.range-value {
  font-size: 13px;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
  font-family: monospace;
}

/* Checkbox Toggle */
.checkbox-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-toggle input {
  width: 18px;
  height: 18px;
  accent-color: #000;
}

/* Tabella comparativa */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 14px;
}

.comparison-table th,
.comparison-table td {
  border: 1px solid #000;
  padding: 12px;
  text-align: left;
}

.comparison-table th {
  background: #f5f5f5;
  font-weight: 600;
}

.comparison-table td {
  vertical-align: top;
}

/* Animazioni */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.demo-area {
  animation: fadeIn 0.3s ease;
}

/* ==========================================
   SISTEMA SLIDE PRESENTATION
   ========================================== */

/* Container principale slide */
.slides-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #fff;
}

/* Singola slide */
.slide {
  position: absolute;
  inset: 0;
  display: none;
  overflow-y: auto;
  padding: 60px 80px 100px;
  background: #fff;
}

.slide.active {
  display: block;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Contenuto slide centrato */
.slide-content {
  max-width: 900px;
  margin: 0 auto;
}

/* Tipografia slide - piu grande per proiezione */
.slide h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 40px;
  line-height: 1.2;
  border-bottom: none;
}

.slide h2 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 32px;
  padding-top: 0;
  border-top: none;
}

.slide h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 20px;
}

.slide p {
  font-size: 1.2rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.slide ul, .slide ol {
  font-size: 1.2rem;
  line-height: 1.7;
  margin-bottom: 24px;
  padding-left: 32px;
}

.slide li {
  margin-bottom: 12px;
}

.slide code {
  font-size: 1.1rem;
  padding: 3px 8px;
}

.slide pre {
  font-size: 1rem;
  padding: 24px;
  margin: 32px 0;
}

.slide pre code {
  font-size: 1rem;
}

/* Info box in slide */
.slide .info-box {
  font-size: 1.1rem;
  padding: 24px 28px;
  margin: 32px 0;
}

.slide .info-box.warning {
  border-left-color: #f0c040;
  background: #fffdf5;
}

/* Navigazione slide */
.nav-btn {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  width: 56px;
  height: 56px;
  font-size: 24px;
  background: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.nav-btn:hover {
  background: #333;
  transform: translateY(-50%) scale(1.05);
}

.nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.nav-prev {
  left: 20px;
}

.nav-next {
  right: 20px;
}

.nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: #666;
}

.nav-btn:disabled:hover {
  transform: translateY(-50%);
}

/* Progress bar */
.progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: #e0e0e0;
  z-index: 1000;
}

.progress-fill {
  height: 100%;
  background: #000;
  transition: width 0.3s ease;
  width: 0;
}

/* Indicatore slide corrente */
.slide-indicator {
  position: fixed;
  bottom: 16px;
  right: 24px;
  font-size: 14px;
  color: #666;
  z-index: 1000;
  font-family: monospace;
}

/* Demo container in slide */
.slide .demo-container {
  margin: 24px 0;
}

/* Layout due colonne per slide */
.slide-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 32px 0;
}

.slide-columns.three {
  grid-template-columns: 1fr 1fr 1fr;
}

/* ==========================================
   INTESTAZIONI FISSE SU TUTTE LE SLIDE
   ========================================== */

.slide-header-left,
.slide-header-right,
.slide-footer-left {
  position: fixed;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 11px;
  color: #999;
  z-index: 1000;
}

.slide-header-left {
  top: 16px;
  left: 24px;
}

.slide-header-right {
  top: 16px;
  right: 24px;
}

.slide-footer-left {
  bottom: 16px;
  left: 24px;
}

/* ==========================================
   SLIDE COPERTINA
   ========================================== */

.slide-cover-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.slide-cover-content h1 {
  font-size: 6rem;
  font-weight: 700;
  margin: 0;
}

.cover-subtitle {
  font-size: 1.5rem;
  color: #666;
  margin: 0 0 8px 0;
  font-weight: 400;
}

.cover-credit {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 11px;
  color: #999;
  text-align: center;
}

.cover-credit a {
  color: #666;
  text-decoration: underline;
}

.cover-credit a:hover {
  color: #333;
}

/* ==========================================
   SLIDE FINALE: GRAZIE
   ========================================== */

.slide-thanks-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.slide-thanks-content h1 {
  font-size: 5rem;
  font-weight: 700;
  margin: 0;
}

.thanks-credit {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 11px;
  color: #999;
  text-align: center;
}

.thanks-credit a {
  color: #666;
  text-decoration: underline;
}

.thanks-credit a:hover {
  color: #333;
}

/* ==========================================
   SLIDE "PROVATE VOI!" (Demo Personali)
   ========================================== */

.slide-try {
  background: linear-gradient(135deg, #f0fff4 0%, #e6ffed 100%);
}

.try-badge {
  display: inline-block;
  background: #22c55e;
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.try-intro {
  font-size: 1.1rem;
  margin-bottom: 32px;
  color: #333;
}

.try-intro a {
  color: #16a34a;
  font-weight: 600;
}

.try-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

@media (max-width: 900px) {
  .try-columns {
    grid-template-columns: 1fr;
  }
}

.try-code h3,
.try-code-full h3,
.try-preview h3,
.try-preview-full h3,
.try-explore h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 16px;
  color: #166534;
}

.try-code pre,
.try-code-full pre {
  background: #fff;
  border: 2px solid #22c55e;
  margin-bottom: 16px;
}

.try-preview {
  background: #fff;
  border: 2px solid #22c55e;
  border-radius: 8px;
  padding: 20px;
}

.try-code-full {
  margin-bottom: 24px;
}

.try-preview-full {
  background: #fff;
  border: 2px solid #22c55e;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.try-explore {
  background: #dcfce7;
  border-radius: 8px;
  padding: 24px;
}

.try-explore ul {
  margin: 0;
  padding-left: 24px;
}

.try-explore li {
  margin-bottom: 8px;
  color: #166534;
}

/* ==========================================
   SLIDE ESERCIZIO (Fine Sezione)
   ========================================== */

.slide-exercise {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.exercise-badge {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.exercise-goal {
  margin-bottom: 32px;
}

.exercise-goal h3,
.exercise-guidelines h3,
.exercise-starter h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 16px;
  color: #1e40af;
}

.exercise-goal > p {
  margin-bottom: 24px;
}

.exercise-preview {
  background: #fff;
  border: 3px solid #3b82f6;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 8px;
}

.exercise-guidelines {
  background: #dbeafe;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
}

.exercise-guidelines ol {
  margin: 0;
  padding-left: 24px;
}

.exercise-guidelines li {
  margin-bottom: 8px;
  color: #1e40af;
}

.exercise-starter {
  margin-bottom: 24px;
}

.exercise-starter pre {
  background: #fff;
  border: 2px solid #3b82f6;
}

.exercise-solution {
  background: #fff;
  border: 2px solid #3b82f6;
  border-radius: 8px;
  overflow: hidden;
}

.exercise-solution summary {
  padding: 16px 24px;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.exercise-solution summary::-webkit-details-marker {
  display: none;
}

.exercise-solution summary::before {
  content: "▶ ";
}

.exercise-solution[open] summary::before {
  content: "▼ ";
}

.exercise-solution pre {
  margin: 0;
  border: none;
  border-radius: 0;
}

/* ==========================================
   FORM-SPECIFIC: Response Panel
   ========================================== */

.demo-response-panel {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 8px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

.response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #45475a;
}

.response-header h4 {
  margin: 0;
  font-size: 0.85rem;
  color: #a6adc8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.response-clear {
  background: none;
  border: none;
  color: #6c7086;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}

.response-clear:hover {
  background: #313244;
  color: #cdd6f4;
}

.response-detail {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  align-items: baseline;
}

.response-label {
  color: #a6adc8;
  min-width: 110px;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.response-value {
  font-weight: 500;
}

.response-value code {
  background: #313244;
  color: #cdd6f4;
  border: none;
  font-size: 0.85rem;
}

.response-method-get {
  background: #a6e3a1;
  color: #1e1e2e;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.response-method-post {
  background: #89b4fa;
  color: #1e1e2e;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: bold;
}

.response-data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
}

.response-data-table th {
  background: #313244;
  padding: 6px 12px;
  text-align: left;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.response-data-table td {
  padding: 6px 12px;
  border-bottom: 1px solid #45475a;
}

.response-data-table td code {
  background: #313244;
  color: #89b4fa;
  border: none;
}

.response-placeholder {
  color: #6c7086;
  font-style: italic;
}

.response-error {
  color: #f38ba8;
}

.response-empty {
  color: #fab387;
}

/* ==========================================
   FORM-SPECIFIC: Attribute Toggle Panel
   ========================================== */

.attribute-panel {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 16px;
}

.attribute-panel h4 {
  margin: 0 0 8px 0;
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.attr-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.attr-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.9rem;
}

.attr-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
}

.attr-toggle code {
  background: #e8e8e8;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.attr-toggle input:checked + code {
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

/* ==========================================
   FORM-SPECIFIC: Form Data Inspector
   ========================================== */

.form-data-inspector {
  background: #fefce8;
  border: 1px solid #fde047;
  border-radius: 8px;
  padding: 12px 16px;
}

.form-data-inspector h4 {
  margin: 0 0 8px 0;
  font-size: 0.85rem;
  color: #854d0e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.inspector-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.inspector-table th {
  background: #fef08a;
  padding: 4px 8px;
  text-align: left;
  font-size: 0.8rem;
}

.inspector-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #fde68a;
}

.inspector-no-name td {
  color: #dc2626;
  text-decoration: line-through;
}

.inspector-will-send {
  color: #16a34a;
  font-weight: bold;
}

.inspector-wont-send {
  color: #dc2626;
}

/* ==========================================
   FORM-SPECIFIC: Input Gallery
   ========================================== */

.input-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

.input-gallery-item {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
}

.input-gallery-item h4 {
  margin: 0 0 8px 0;
  font-size: 0.9rem;
}

.input-gallery-demo {
  margin: 8px 0;
}

.input-gallery-demo input,
.input-gallery-demo select,
.input-gallery-demo textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
}

.input-gallery-notes {
  margin: 8px 0 0 0;
  padding-left: 16px;
  font-size: 0.8rem;
  color: #666;
}

/* ==========================================
   FORM-SPECIFIC: Demo Form Preview
   ========================================== */

.demo-form-preview {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
}

.demo-form-preview label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

.demo-form-preview input,
.demo-form-preview select,
.demo-form-preview textarea {
  display: block;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
}

.demo-form-preview input[type="checkbox"],
.demo-form-preview input[type="radio"] {
  display: inline;
  width: auto;
  margin-bottom: 0;
  margin-right: 6px;
}

.demo-form-preview input[type="color"] {
  width: 60px;
  height: 36px;
  padding: 2px;
}

.demo-form-preview input[type="range"] {
  padding: 0;
}

.demo-form-preview input[type="file"] {
  padding: 4px;
}

.demo-form-preview button[type="submit"],
.demo-form-preview input[type="submit"] {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 8px 24px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  display: inline-block;
  width: auto;
}

.demo-form-preview button[type="submit"]:hover,
.demo-form-preview input[type="submit"]:hover {
  background: #2563eb;
}

.demo-form-preview button[type="reset"] {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ccc;
  padding: 8px 24px;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  margin-left: 8px;
}

.demo-form-preview fieldset {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.demo-form-preview legend {
  font-weight: 600;
  padding: 0 8px;
  font-size: 0.95rem;
}

/* ==========================================
   FORM-SPECIFIC: Demo Split (form + response)
   ========================================== */

.demo-area-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .demo-area-split {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   FORM-SPECIFIC: Warning Slide
   ========================================== */

.slide-warning {
  background: #fef2f2;
  border-left: 6px solid #dc2626;
}

.slide-warning h2 {
  color: #dc2626;
}

.warning-box {
  background: #fee2e2;
  border: 2px solid #f87171;
  border-radius: 8px;
  padding: 20px;
  margin: 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

/* ==========================================
   FORM-SPECIFIC: Live Code Display
   ========================================== */

.live-code-display {
  background: #2d2d2d;
  border-radius: 8px;
  padding: 12px;
  margin-top: 8px;
  overflow-x: auto;
}

.live-code-display code {
  font-size: 0.8rem;
  line-height: 1.4;
  background: none;
  border: none;
  color: #e0e0e0;
}

/* ==========================================
   FORM-SPECIFIC: Comparison Boxes
   ========================================== */

.comparison-boxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin: 32px 0;
}

@media (max-width: 800px) {
  .comparison-boxes {
    grid-template-columns: 1fr;
  }
}

.comparison-box {
  background: #f9f9f9;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px;
}

.comparison-box h4 {
  font-size: 1.1rem;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e0e0e0;
}

.comparison-box ul {
  margin: 0;
  padding-left: 20px;
}

.comparison-box li {
  margin-bottom: 8px;
  font-size: 1rem;
}

.comparison-box.get-box {
  border-color: #a6e3a1;
  background: #f0fdf4;
}

.comparison-box.post-box {
  border-color: #89b4fa;
  background: #eff6ff;
}

/* Riepilogo tabella */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 1rem;
}

.summary-table th,
.summary-table td {
  border: 1px solid #000;
  padding: 12px 16px;
  text-align: left;
}

.summary-table th {
  background: #f5f5f5;
  font-weight: 600;
}

.summary-table td code {
  font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1200px) {
  .slide {
    padding: 40px 60px 80px;
  }

  .slide h1 {
    font-size: 2.5rem;
  }

  .slide h2 {
    font-size: 1.8rem;
  }

  .slide p, .slide ul, .slide ol {
    font-size: 1.1rem;
  }

  .nav-btn {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }
}

@media (max-width: 900px) {
  .slide {
    padding: 32px 40px 80px;
  }

  .slide-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .nav-prev {
    left: 10px;
  }

  .nav-next {
    right: 10px;
  }
}

/* ==========================================
   COVER TAGLINE
   ========================================== */

.cover-tagline {
  font-size: 1.3rem;
  color: #666;
  margin-top: 16px;
  font-weight: 400;
}

/* ==========================================
   LAYOUT CARDS (Anatomia Form)
   ========================================== */

.layout-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 32px 0;
}

@media (max-width: 900px) {
  .layout-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.layout-card {
  background: #f8f9fa;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.layout-card h3 {
  font-size: 1.1rem;
  margin: 0 0 8px 0;
}

.layout-card h3 code {
  display: inline;
  margin-bottom: 0;
}

.layout-card p {
  font-size: 0.9rem;
  margin: 0;
  color: #555;
  margin-top: auto;
  padding-top: 8px;
}

/* Live preview inside anatomy cards */
.layout-card-preview {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 10px;
  margin: 8px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layout-card-preview input[type="text"],
.layout-card-preview textarea,
.layout-card-preview select {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 100%;
  max-width: 160px;
}

.layout-card-preview textarea {
  resize: none;
}

.layout-card-preview button {
  font-family: inherit;
  font-size: 0.8rem;
  padding: 6px 16px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: default;
}

.layout-card-preview-form {
  flex-direction: column;
  gap: 2px;
}

.layout-card-preview .preview-tag {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.75rem;
  color: #888;
}

.layout-card-preview .preview-dots {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.75rem;
  color: #ccc;
}

.layout-card-preview .preview-label-example {
  font-weight: 600;
  font-size: 0.85rem;
  cursor: default;
  display: inline;
  margin: 0;
}

.layout-card-preview-fieldset fieldset {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 0;
  width: 100%;
}

.layout-card-preview-fieldset legend {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0 4px;
}

.layout-card-preview-checks {
  gap: 8px;
  flex-wrap: wrap;
}

.layout-card-preview-checks label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8rem;
  cursor: default;
  font-weight: 400;
  margin: 0;
}

.layout-card-preview-checks input {
  width: auto;
  max-width: none;
  margin: 0;
  accent-color: #3b82f6;
}

.layout-card-preview-misc {
  gap: 8px;
}

.layout-card-preview-misc input[type="date"] {
  font-size: 0.75rem;
  padding: 2px 4px;
  max-width: 120px;
}

.layout-card-preview-misc input[type="color"] {
  width: 28px;
  height: 28px;
  padding: 1px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: default;
}

.layout-card-preview-misc input[type="range"] {
  width: 80px;
  max-width: 80px;
  padding: 0;
}

/* ==========================================
   RECAP TABLE (Riepilogo)
   ========================================== */

.recap-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 1rem;
}

.recap-table th,
.recap-table td {
  border: 1px solid #000;
  padding: 10px 14px;
  text-align: left;
}

.recap-table th {
  background: #f5f5f5;
  font-weight: 600;
}

.recap-table td code {
  font-size: 0.9rem;
}

/* ==========================================
   SERVER RESPONSE EXAMPLE
   ========================================== */

.server-response-example {
  background: #1e1e2e;
  border-radius: 8px;
  padding: 16px 20px;
  margin-top: 16px;
}

.server-response-example h4 {
  color: #a6adc8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px 0;
}

.response-format-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.response-format-switch > span {
  color: #a6adc8;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.response-format-switch .inline-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.response-format-switch label {
  color: #cdd6f4;
  font-size: 0.8rem;
  cursor: pointer;
}

.response-format-switch input[type="radio"] {
  accent-color: #89b4fa;
}

.server-response-example pre {
  margin: 0;
  background: transparent;
  border: none;
  padding: 0;
}

.server-response-example code {
  color: #cdd6f4;
  font-size: 0.85rem;
  line-height: 1.6;
  background: transparent;
  white-space: pre-wrap;
}

/* ==========================================
   DEMO COMPARE (Side-by-Side)
   ========================================== */

.demo-area-compare {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .demo-area-compare {
    grid-template-columns: 1fr;
  }
}

.demo-area-compare--stacked {
  grid-template-columns: 1fr;
  max-width: 560px;
  margin-inline: auto;
}

.demo-compare-left,
.demo-compare-center,
.demo-compare-right {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.demo-compare-left h4,
.demo-compare-center h4,
.demo-compare-right h4 {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
}

.demo-compare-note {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  margin-top: auto;
  padding-top: 8px;
  margin-bottom: 0;
}

.demo-compare-left input,
.demo-compare-center input,
.demo-compare-right input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  max-width: 200px;
}

.demo-compare-left label,
.demo-compare-center label,
.demo-compare-right label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ==========================================
   FORM-SPECIFIC: Inline Radio/Checkbox Options
   ========================================== */

.demo-form-preview .inline-option {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.demo-form-preview .inline-option input[type="radio"],
.demo-form-preview .inline-option input[type="checkbox"] {
  margin-bottom: 0;
}

.demo-form-preview .inline-option label {
  display: inline;
  margin-bottom: 0;
  font-weight: 400;
}

/* ==========================================
   FORM-SPECIFIC: Textarea Demo (slide 10)
   ========================================== */

#demo-s10-textarea .demo-area textarea {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  resize: both;
}
