:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe3ea;
  --primary: #085CDD;
  --primary-dark: #0648ad;
  --accent: #c2410c;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 46px;
  max-width: min(220px, 52vw);
  object-fit: contain;
}

.top-actions {
  display: flex;
  gap: 10px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: stretch;
  padding: clamp(34px, 5vw, 72px) clamp(16px, 4vw, 48px) 24px;
}

.hero-copy {
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy p:last-child {
  max-width: 660px;
  color: var(--muted);
  font-size: 1.08rem;
}

.trust-panel {
  align-self: end;
  display: grid;
  gap: 12px;
}

.trust-panel div {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.trust-panel strong,
.trust-panel span {
  display: block;
}

.trust-panel span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.92rem;
}

.generator-shell {
  padding: 0 clamp(16px, 4vw, 48px) 32px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 22px;
  align-items: start;
}

.form-area {
  display: grid;
  gap: 18px;
}

.form-section,
.summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-section {
  padding: clamp(16px, 3vw, 24px);
}

.section-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 2px;
  font-size: 1.12rem;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.step {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border-radius: 8px;
  font-weight: 800;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid.compact {
  margin-top: 16px;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.items-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #fff;
  background: #111827;
  font-size: 0.84rem;
}

td:last-child,
th:last-child {
  width: 58px;
  text-align: center;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.line-total {
  min-width: 88px;
  font-weight: 800;
  text-align: right;
}

.delete-row {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--danger);
  border-radius: 7px;
  cursor: pointer;
}

.primary-button,
.secondary-button,
.dark-button,
.ghost-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border-radius: 7px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-button {
  color: #fff;
  background: var(--primary);
}

.dark-button {
  color: #fff;
  background: #111827;
}

.secondary-button {
  margin-top: 14px;
  color: var(--primary-dark);
  background: #eaf2ff;
}

.ghost-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

button:hover {
  transform: translateY(-1px);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.dark-button:hover {
  background: #273449;
}

.summary-panel {
  position: sticky;
  top: 86px;
}

.summary-card {
  padding: 22px;
}

.summary-card h2 {
  font-size: 1.1rem;
}

dl {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  font-weight: 800;
  text-align: right;
}

.total-row {
  align-items: center;
  padding: 12px;
  color: #fff;
  background: #111827;
  border-bottom: 0;
  border-radius: 8px;
}

.total-row dt {
  color: #fff;
}

.total-row dd {
  font-size: 1.25rem;
}

.button-stack {
  display: grid;
  gap: 10px;
}

.privacy-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.info-band {
  margin: 10px clamp(16px, 4vw, 48px) 46px;
  padding: clamp(22px, 4vw, 36px);
  background: #fff;
  border-left: 5px solid var(--accent);
}

.info-band h2 {
  margin-bottom: 8px;
}

.info-band p {
  max-width: 820px;
  margin-bottom: 0;
  color: var(--muted);
}

.site-footer {
  padding: 24px clamp(16px, 4vw, 48px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1040px) {
  .workspace,
  .hero {
    grid-template-columns: 1fr;
  }

  .summary-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .top-actions button {
    width: 100%;
  }

  .field-grid.two,
  .field-grid.three {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 28px;
  }

  h1 {
    font-size: 2.25rem;
  }
}
