:root{
  --bg-color: #fcfbfa;
  --surface: #ffffff;
  --text-main: #33312e;
  --text-muted: #66635c;
  --accent: #bc4749;
  --accent-hover: #a03c3e;
  --border: #e3dec9;
  --focus-ring: rgba(188, 71, 73, 0.4);
  --font-sans: system-ui, -apple-system, sans-serif;
  --radius: 6px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}
.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text-main);
  letter-spacing: -0.02em;
}
.top-nav {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.top-nav a { text-decoration: none; color: var(--text-muted); }
.top-nav a:hover { color: var(--accent); }

.app-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
}
@media (min-width: 900px) {
  .app-layout {
    grid-template-columns: 1fr 350px;
  }
}

.hero { margin-bottom: 2rem; }
.hero h1 { font-size: 2.25rem; margin-bottom: 0.5rem; line-height: 1.2; }
.hero p { font-size: 1.125rem; color: var(--text-muted); }

.calculator-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  margin-bottom: 2rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group.row { display: flex; gap: 1rem; }
.form-group.row .col { flex: 1; }
label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
input[type="number"], select {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.hidden { display: none !important; }

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
button {
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: #f1ebd8;
  color: var(--text-main);
}
.btn-secondary:hover { background: #e6dfc7; }
.btn-text {
  background: transparent;
  color: var(--text-muted);
  font-weight: 400;
  padding: 0;
  text-decoration: underline;
}

.results {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px dashed var(--border);
}
.result-stat { margin: 1rem 0; font-size: 1.2rem; color: var(--text-muted); }
.big-number { font-size: 3rem; font-weight: 700; color: var(--text-main); line-height: 1; }
.unit { font-size: 0.9rem; margin-left: 0.5rem; }
.result-detail { color: var(--text-muted); font-size: 0.9rem; }

.project-log h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.log-header { display: flex; justify-content: space-between; align-items: baseline; }
.log-list { list-style: none; }
.log-item {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.log-meta { font-size: 0.9rem; color: var(--text-muted); }

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.guide-card h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.guide-card h4 { font-size: 0.95rem; margin-top: 1.25rem; margin-bottom: 0.5rem; }
.guide-card p, .guide-card ul { font-size: 0.9rem; color: var(--text-muted); }
.guide-card ul { margin-left: 1.25rem; margin-bottom: 1rem; }

.fabric-table { width: 100%; border-collapse: collapse; margin-top: 1rem; font-size: 0.85rem; }
.fabric-table th, .fabric-table td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.fabric-table th { font-weight: 600; color: var(--text-main); }

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  margin-top: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.site-footer a { color: var(--text-main); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-links {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 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;
}
