:root {
  --bg: #f5f2e8;
  --ink: #1f2933;
  --muted: #4b5563;
  --card: #fffdf7;
  --line: #d5cfc1;
  --accent: #c84630;
  --accent-2: #1f6f78;
  --chip: #e9f2ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, #fff8e6, transparent 35%),
              radial-gradient(circle at 90% 20%, #cce8ec, transparent 30%),
              var(--bg);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(30px);
  opacity: 0.55;
}

.shape-a {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: #ffd69d;
  left: -60px;
  top: 140px;
}

.shape-b {
  width: 320px;
  height: 320px;
  border-radius: 46% 54% 38% 62% / 45% 38% 62% 55%;
  background: #8fd3da;
  right: -90px;
  bottom: 100px;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 16px 40px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 3;
  backdrop-filter: blur(12px);
  background: rgba(245, 242, 232, 0.8);
  border-bottom: 1px solid rgba(213, 207, 193, 0.7);
}

.site-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  max-height: 48px;
  height: auto;
  width: auto;
  display: block;
  flex-shrink: 0;
  align-self: center;
}

.brand-subtitle {
  display: none;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
  color: #21425c;
}

.top-nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
}

.top-nav a:hover {
  border-bottom-color: var(--accent-2);
}

.hero h1 {
  font-family: "Outfit", sans-serif;
  margin: 4px 0 10px;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
}

.eyebrow {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-2);
  margin: 0;
}

.intro {
  max-width: 780px;
  color: var(--muted);
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 4px 16px rgba(36, 31, 25, 0.08);
  animation: rise-in 420ms ease;
}

@keyframes rise-in {
  from {
    transform: translateY(10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.panel-head h2 {
  margin: 0;
  font-family: "Outfit", sans-serif;
}

.panel-head p {
  margin: 6px 0 12px;
  color: var(--muted);
}

.tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.tab-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn.active {
  background: #163f38;
  border-color: #163f38;
  color: #fff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-placeholder,
.tab-note {
  margin: 0;
  color: var(--muted);
}

.fabric-form {
  display: grid;
  gap: 14px;
}

.field-block {
  display: grid;
  gap: 8px;
}

.field-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #264156;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(220px, 1fr);
  gap: 10px;
  align-items: start;
}

.field-row:has(.inline-numeric:only-child),
.field-row > select:only-child {
  grid-template-columns: minmax(260px, 420px);
}

.field-row input,
.field-row select,
.compact-card input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #bfc5cc;
  border-radius: 10px;
  font-family: inherit;
  background: #fff;
}

.inline-numeric {
  display: grid;
  gap: 6px;
}

.inline-numeric-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.compact-card {
  display: grid;
  gap: 8px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.row input,
.row select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #bfc5cc;
  border-radius: 8px;
  font-family: inherit;
}

.row label {
  min-width: 130px;
  font-size: 0.88rem;
  color: var(--muted);
}

.btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-small {
  padding: 8px 10px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-secondary {
  background: var(--accent-2);
  color: #fff;
}

.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid #bcd8cd;
  background: var(--chip);
  color: #163f38;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.result {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
}

.result-card p {
  margin: 0;
  color: var(--muted);
}

.result-card strong {
  display: block;
  margin-top: 6px;
  font-family: "Outfit", sans-serif;
  font-size: 1.5rem;
}

.result-card.wide {
  grid-column: 1 / -1;
}

.step-line {
  margin: 6px 0;
  padding: 6px;
  background: #f8fbff;
  border-left: 3px solid #75aadb;
}

@media (max-width: 700px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .brand-logo {
    max-height: 40px;
    width: auto;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .row label {
    min-width: 0;
  }
}
