/* Book Binding Style Selector - Styles */
* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
  margin: 0;
  padding: 0;
}

.site-header {
  background: linear-gradient(135deg, #8B4513 0%, #654321 100%);
  color: white;
  padding: 1rem 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.site-nav {
  margin-top: 0.5rem;
}

.site-nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  margin-right: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: white;
  text-decoration: underline;
}

.site-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.intro {
  background: #f8f4e9;
  border-left: 4px solid #8B4513;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 0 4px 4px 0;
}

.binding-form {
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #555;
}

.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  background: white;
  cursor: pointer;
}

#calculate-btn {
  background: linear-gradient(135deg, #8B4513, #654321);
  color: white;
  border: none;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

#calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(139, 69, 19, 0.3);
}

#calculate-btn:active {
  transform: translateY(0);
}

.results-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.results-section h2 {
  margin-top: 0;
  color: #8B4513;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 0.5rem;
}

.result-card {
  background: #f8f4e9;
  border-left: 4px solid #8B4513;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
}

.result-card h3 {
  margin-top: 0;
  color: #555;
}

.result-card .binding-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #8B4513;
  margin-bottom: 0.5rem;
}

.result-card .durability {
  display: inline-block;
  background: #8B4513;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

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

.comparison-table th {
  background: #8B4513;
  color: white;
  font-weight: 600;
}

.comparison-table tr:nth-child(even) {
  background: #f9f9f9;
}

.export-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.export-controls button {
  padding: 0.75rem 1rem;
  border: 1px solid #8B4513;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.export-controls button:hover {
  background: #8B4513;
  color: white;
}

.history-section {
  background: #f0f0f0;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.history-section h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

#history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#history-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e0e0e0;
}

#history-list li:last-child {
  border-bottom: none;
}

#history-list li a {
  color: #8B4513;
  text-decoration: none;
}

#history-list li a:hover {
  text-decoration: underline;
}

supporting-content {
  margin-top: 2rem;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

binding-explainer {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  border-top: 3px solid #8B4513;
}

binding-explainer h3 {
  color: #8B4513;
  margin-top: 0;
}

site-footer {
  background: #333;
  color: #aaa;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

site-footer a {
  color: #8B4513;
  text-decoration: none;
}

site-footer a:hover {
  text-decoration: underline;
}

.durability-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.durability-table th,
.durability-table td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: left;
}

.durability-table th {
  background: #8B4513;
  color: white;
}

.durability-table tr:nth-child(even) {
  background: #f9f9f9;
}

@media (max-width: 600px) {
  .site-main {
    padding: 1rem;
  }
  
  .binding-form {
    padding: 1.5rem;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .export-controls {
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .site-header {
    padding: 0.75rem 1rem;
  }
  
  .site-header h1 {
    font-size: 1.25rem;
  }
  
  .result-card {
    padding: 1rem;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
