/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --amber-50: #FFFBEB;
  --amber-100: #FEF3C7;
  --amber-200: #FDE68A;
  --amber-300: #FCD34D;
  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-700: #B45309;
  --amber-800: #92400E;
  --stone-50: #FAFAF9;
  --stone-100: #F5F5F4;
  --stone-200: #E7E5E4;
  --stone-300: #D6D3D1;
  --stone-600: #57534E;
  --stone-700: #44403C;
  --stone-800: #292524;
  --stone-900: #1C1917;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 12px;
  background: var(--amber-500);
  color: var(--white);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--stone-200);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--stone-900);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.logo svg {
  flex-shrink: 0;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 24px;
}

.site-nav a {
  text-decoration: none;
  color: var(--stone-600);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--amber-600);
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--amber-50) 0%, var(--amber-100) 100%);
  padding: 64px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--stone-900);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--stone-700);
  max-width: 620px;
  margin: 0 auto;
}

/* ===== SECTIONS ===== */
section {
  padding: 56px 0;
}

section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--stone-900);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}

/* ===== CARD ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px;
}

.calc-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* ===== FORM ===== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--stone-700);
  margin-bottom: 6px;
}

select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--stone-300);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  background: var(--white);
  color: var(--stone-800);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2357534E'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus {
  outline: none;
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.range-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

input[type="range"] {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--stone-200);
  border-radius: 4px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: var(--amber-500);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--amber-600);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: var(--amber-500);
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

.range-value {
  font-weight: 700;
  font-size: 1rem;
  min-width: 52px;
  text-align: right;
  color: var(--stone-800);
}

.btn-primary {
  display: inline-block;
  width: 100%;
  padding: 14px 24px;
  background: var(--amber-500);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.05rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  margin-top: 8px;
}

.btn-primary:hover {
  background: var(--amber-600);
  box-shadow: var(--shadow-md);
}

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

/* ===== RESULT PANEL ===== */
.result-panel {
  background: var(--amber-50);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  text-align: center;
}

.result-placeholder svg {
  margin-bottom: 16px;
  opacity: 0.7;
}

.result-placeholder p {
  color: var(--stone-600);
  font-size: 0.95rem;
}

.result-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stone-600);
  margin-bottom: 8px;
}

.result-temp {
  font-size: 3.8rem;
  font-weight: 800;
  color: var(--amber-700);
  line-height: 1;
  letter-spacing: -0.02em;
}

.result-note {
  margin-top: 12px;
  font-size: 0.95rem;
  color: var(--stone-700);
  max-width: 240px;
}

.hidden {
  display: none !important;
}

/* ===== GUIDE CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.info-card:hover {
  box-shadow: var(--shadow-md);
}

.info-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--amber-700);
  margin-bottom: 12px;
}

.info-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-card li {
  font-size: 0.9rem;
  color: var(--stone-700);
  padding-left: 18px;
  position: relative;
}

.info-card li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--amber-500);
  font-weight: 700;
}

/* ===== TECHNIQUE ===== */
.technique-section {
  background: var(--white);
  border-top: 1px solid var(--stone-200);
  border-bottom: 1px solid var(--stone-200);
}

.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 36px;
  align-items: start;
}

.tech-text p {
  margin-bottom: 16px;
  font-size: 1rem;
  color: var(--stone-700);
}

.tech-tip {
  background: var(--amber-50);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border: 1px solid var(--amber-200);
}

.tech-tip svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.tech-tip p {
  font-size: 0.95rem;
  color: var(--stone-700);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--stone-900);
  color: var(--stone-300);
  padding: 32px 0;
  margin-top: auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--amber-300);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--amber-200);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--stone-600);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 20px;
  }

  .site-nav ul {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
  }

  .calc-card {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 40px 0 32px;
  }

  section {
    padding: 40px 0;
  }

  .result-temp {
    font-size: 2.8rem;
  }
}

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

  .logo span {
    font-size: 0.95rem;
  }

  .footer-links {
    gap: 16px;
  }
}



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

.site-utility-links {
  width: min(900px, calc(100% - 32px));
  margin: 32px auto;
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(127, 127, 127, 0.25);
  font-size: 0.9rem;
}

.site-utility-links a {
  color: inherit;
  opacity: 0.75;
}
