:root {
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-50: #f8fafc;
  --white: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--slate-50);
  color: var(--brand-primary, #0f172a);
}

.wrap { max-width: 720px; margin: 0 auto; padding: 32px 20px 64px; }

header h1 { margin: 0 0 6px; font-size: 1.5rem; }
header p { margin: 0 0 4px; color: var(--slate-500); }

.brand { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.brand .logo { height: 48px; width: auto; object-fit: contain; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  margin-bottom: 8px;
}

.progress-track {
  height: 8px;
  background: var(--slate-200);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 24px;
}

#progress-bar {
  height: 100%;
  width: 25%;
  background: var(--brand-secondary, #0284c7);
  transition: width 0.25s ease;
}

.card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  padding: 24px;
}

.hidden { display: none; }

label { display: block; font-weight: 600; font-size: 0.875rem; margin: 16px 0 6px; }

input[type="text"],
input[type="number"],
textarea,
input[type="file"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  font: inherit;
}

textarea { min-height: 88px; resize: vertical; }

.check { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 500; }

.actions { display: flex; justify-content: space-between; margin-top: 24px; gap: 12px; }

button {
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:disabled { opacity: 0.7; cursor: wait; }

.btn-primary { background: var(--brand-secondary, #0284c7); color: var(--white); }
.btn-secondary { background: var(--slate-50); color: var(--slate-700); border: 1px solid var(--slate-200); }

button, .btn-primary, .btn-secondary { min-height: 44px; }

@media (max-width: 640px) {
  .wrap { padding: 16px 16px 48px; }
  .actions { flex-direction: column-reverse; }
  .actions button { width: 100%; }
}

.field-hint { color: var(--slate-500); font-size: 0.875rem; margin: 16px 0 8px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0;
  font-weight: 500;
}
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  font: inherit;
  min-height: 44px;
}
.line-items { list-style: none; padding: 0; margin: 0 0 16px; }
.line-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--slate-200); font-size: 0.875rem; }
.net { font-size: 1.125rem; }
.app-nav {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.app-nav a {
  color: var(--brand-secondary, #0284c7);
  font-weight: 600;
  text-decoration: none;
}
.app-nav a[aria-current="page"] { text-decoration: underline; }
.gps-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

fieldset {
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  margin: 16px 0 0;
  padding: 8px 12px 12px;
}
legend { font-weight: 600; font-size: 0.875rem; padding: 0 4px; }

.tier-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  font-weight: 500;
}
.tier-card.is-selected,
.tier-card:has(input:checked) {
  border-color: var(--brand-secondary, #0284c7);
  background: var(--slate-50);
}
.tier-card.is-featured { position: relative; }
.tier-badge {
  display: inline-block;
  background: var(--brand-secondary, #0284c7);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 6px;
}
.glance {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin: 8px 0 16px;
}
.glance th, .glance td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: top;
}
.glance tr.is-selected td { background: var(--slate-50); font-weight: 600; }
.help { margin: 16px 0 0; font-size: 0.875rem; color: var(--slate-700); }
.help summary { cursor: pointer; font-weight: 600; color: var(--brand-secondary, #0284c7); }
.help p { margin: 8px 0 0; color: var(--slate-500); }

#contractor-theme.compact-header .brand { gap: 8px; margin-bottom: 12px; }
#contractor-theme.compact-header h1 { font-size: 1.25rem; }
