/* Resin Mix Ratio Calculator – Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #7C5CFC;
  --color-primary-dark: #5A3FCF;
  --color-primary-light: #F3EEFF;
  --color-surface: #ffffff;
  --color-bg: #F9F7FD;
  --color-text: #1E1B2E;
  --color-text-muted: #5C5772;
  --color-border: #E0D9F5;
  --color-resin: #A78BFA;
  --color-hardener: #6EE7B7;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 24px rgba(30, 27, 46, 0.08);
  --shadow-elevated: 0 8px 32px rgba(30, 27, 46, 0.12);
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.logo-accent {
  color: var(--color-primary);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--color-primary);
}

/* Hero */
.hero-section {
  padding: 3rem 0 1.5rem;
  text-align: center;
}

.hero-section h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

/* Calculator */
.calculator-section {
  padding: 1rem 0 3rem;
}

.calculator-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2rem 2rem 2.5rem;
  border: 1px solid var(--color-border);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-text);
}

.form-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.form-group {
  flex: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group select,
.form-group input {
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 100%;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.15);
}

.input-with-unit {
  display: flex;
  gap: 0.5rem;
}

.input-with-unit input {
  flex: 2;
}

.input-with-unit select {
  flex: 1;
  min-width: 70px;
}

.btn-calculate {
  display: inline-block;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}

.btn-calculate:hover {
  background: var(--color-primary-dark);
}

.btn-calculate:active {
  transform: scale(0.98);
}

.btn-calculate:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

/* Results */
.results-panel {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--color-primary-light);
  border-radius: var(--radius-md);
  animation: fadeIn 0.3s ease;
}

.results-panel h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.result-cards {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.result-card {
  flex: 1;
  min-width: 140px;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.resin-card {
  border-left: 4px solid var(--color-resin);
}

.hardener-card {
  border-left: 4px solid var(--color-hardener);
}

.result-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.result-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}

.result-unit {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-left: 0.15rem;
}

.result-ratio {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.conversion-row {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-primary-dark);
  background: rgba(124, 92, 252, 0.08);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
}

/* Info Section */
.info-section {
  padding: 3rem 0;
}

.info-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  text-align: center;
}

.info-card svg {
  margin-bottom: 1rem;
}

.info-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.info-card p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* Tips */
.tips-section {
  padding: 2rem 0 3rem;
}

.tips-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.75rem;
}

.tips-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.tips-list li {
  background: var(--color-surface);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  color: var(--color-text);
  position: relative;
  padding-left: 2.5rem;
}

.tips-list li::before {
  content: '💡';
  position: absolute;
  left: 0.9rem;
  top: 1rem;
  font-size: 1rem;
}

.tips-list li strong {
  color: var(--color-primary-dark);
}

/* FAQ */
.faq-section {
  padding: 2rem 0 4rem;
}

.faq-section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
}

.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.faq-list dt {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.faq-list dd {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-left: 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-primary);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .calculator-card {
    padding: 1.5rem 1.25rem;
  }

  .form-row {
    flex-direction: column;
    gap: 1rem;
  }

  .form-group {
    min-width: 100%;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-inner {
    flex-direction: column;
    gap: 0.5rem;
  }

  .main-nav {
    gap: 1rem;
  }

  .result-cards {
    flex-direction: column;
  }

  .result-value {
    font-size: 1.6rem;
  }
}



/* 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;
}
