* {
  box-sizing: border-box;
}

:root {
  --navy: #14243a;
  --navy-2: #1e3553;
  --slate: #5d6b7c;
  --light-bg: #edf3fb;
  --light-bg-2: #dce8f7;
  --white: #ffffff;
  --gold: #c79d3b;
  --gold-dark: #9a7724;
  --border: rgba(20, 36, 58, 0.12);
  --shadow: 0 10px 28px rgba(20, 36, 58, 0.08);
  --danger: #a63c3c;
  --success: #276749;
  --warning: #8a6a13;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--navy);
  background: #f7fafe;
}

body {
  min-height: 100vh;
}

.page-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 24px 56px;
  background: linear-gradient(135deg, var(--light-bg), var(--light-bg-2));
  border-bottom: 1px solid var(--border);
}

.hero-watermark {
  position: absolute;
  inset: 0;
  background-image: url("assets/logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 980px;
  opacity: 0.18;
  filter: grayscale(100%) brightness(1.15);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.logo {
  width: 128px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
}

h1 {
  margin: 0;
  font-size: 2.5rem;
  line-height: 1.1;
  color: var(--navy);
}

.subtitle {
  max-width: 850px;
  margin: 14px auto 10px;
  font-size: 1.1rem;
  color: #314863;
}

.tagline {
  margin: 0 auto;
  font-weight: 700;
  color: var(--gold-dark);
}

.hero-badges {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(20, 36, 58, 0.08);
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 700;
}

.main-content {
  max-width: 1220px;
  margin: 0 auto;
  padding: 26px 18px 48px;
}

.tabs-section {
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-button {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.tab-button.active {
  background: var(--navy);
  color: var(--white);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.panel-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.card,
.summary-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h2,
.card h3,
.summary-card h3 {
  margin-top: 0;
  color: var(--navy);
}

.card h4 {
  margin-bottom: 10px;
  color: var(--navy-2);
}

.muted {
  color: var(--slate);
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.field-label {
  font-weight: 700;
  color: var(--navy);
  margin-top: 4px;
}

input[type="file"],
input[type="text"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #c8d5e6;
  background: #fbfdff;
  color: var(--navy);
  font-size: 0.98rem;
}

textarea {
  resize: vertical;
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  background: var(--navy);
  color: var(--white);
}

.secondary-btn {
  background: #e4ecf7;
  color: var(--navy);
}

.primary-btn:hover,
.secondary-btn:hover,
.tab-button:hover {
  filter: brightness(0.98);
}

.disclaimer {
  margin-top: 14px;
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--gold-dark);
}

.feature-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.feature-item {
  background: #f3f7fc;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
}

.sam-search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: end;
}

.sam-search-actions {
  display: flex;
  align-items: end;
}

.results-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.status-text {
  color: var(--slate);
  font-size: 0.95rem;
  font-weight: 700;
}

.sam-results-list {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.sam-item {
  border: 1px solid #d8e3f0;
  border-radius: 14px;
  padding: 16px;
  background: #fbfdff;
}

.sam-item-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.sam-item h4 {
  margin: 0 0 6px;
}

.sam-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.sam-meta span {
  background: #eef4fb;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.9rem;
  border: 1px solid #d7e1ee;
}

.sam-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.sam-link {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f1f5fb;
  color: var(--navy);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid #d9e3ef;
}

.results-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.summary-card {
  min-height: 135px;
}

.summary-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--gold-dark);
  margin-top: 8px;
}

.summary-pill {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef4fb;
  border: 1px solid #d5e0ec;
  font-weight: 800;
}

.summary-text {
  margin-top: 16px;
  font-weight: 700;
  font-size: 1.04rem;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.snapshot-item {
  background: #f7fbff;
  border: 1px solid #dbe5f0;
  border-radius: 12px;
  padding: 12px;
}

.snapshot-label {
  display: block;
  font-size: 0.82rem;
  color: var(--slate);
  margin-bottom: 6px;
  font-weight: 700;
}

.snapshot-value {
  font-weight: 700;
  color: var(--navy);
  word-break: break-word;
}

.split-list-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
}

.estimator-box {
  display: grid;
  gap: 10px;
}

.estimator-row {
  background: #f6faff;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  padding: 12px;
}

.estimator-row strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.text-block {
  white-space: pre-wrap;
  line-height: 1.6;
  color: var(--navy);
}

.preview-box {
  white-space: pre-wrap;
  word-wrap: break-word;
  background: #f5f9ff;
  border: 1px solid #dae6f3;
  border-radius: 14px;
  padding: 16px;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  color: var(--navy);
}

.empty-state {
  color: var(--slate);
  margin: 0;
}

.site-footer {
  text-align: center;
  padding: 22px 16px 34px;
  color: var(--slate);
  font-size: 0.93rem;
}


@media (max-width: 1100px) {
  .dashboard-grid,
  .summary-grid,
  .sam-search-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .hero-watermark {
    background-size: 760px;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 2rem;
  }

  .dashboard-grid,
  .summary-grid,
  .sam-search-grid,
  .feature-list,
  .snapshot-grid,
  .split-list-wrap {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 58px 18px 42px;
  }

  .hero-watermark {
    background-size: 520px;
    opacity: 0.15;
  }

  .results-header-row,
  .sam-item-top,
  .results-actions {
    flex-direction: column;
    align-items: stretch;
  }
}