body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background-color: #f9fafb;
  color: #111827;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  scroll-behavior: smooth;
}

nav {
  width: 100%;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.25rem;
  color: #111827;
  text-decoration: none;
}

.nav-left span.logo {
  border: 2px solid #111827;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-right a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-right a:hover,
.nav-right a.active {
  color: #111827;
  text-decoration: underline;
  text-underline-offset: 6px;
}

header {
  text-align: center;
  margin: 1.1rem 0 1rem;
}

header h1 {
  font-size: 2.25rem;
  font-weight: 600;
}

header p {
  color: #6b7280;
  font-size: 1.1rem;
}

.case-study p,
.case-study li {
  font-size: 0.95rem;
  line-height: 1.65;
}

.case-study h2 {
  margin-top: 0rem;
  font-size: 2rem;
}

.case-study h3 {
  color: #2563eb;
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.35rem;
}

.case-study h4 {
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
}

.case-study ul {
  margin: 0.25rem 0 0 0;
  padding-left: 1.15rem;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid #d1d5db;
  cursor: pointer;
  background: white;
  color: #111827;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  background: #f3f4f6;
}

.tab-btn.active {
  background-color: #2563eb;
  color: white;
  border-color: #111827;
}

.card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding: 2rem;
  width: 90%;
  max-width: 740px;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
}

.description-card {
  max-width: 1040px;
}

.card.active {
  opacity: 1;
  transform: translateY(0);
}

.project-hero {
  margin-bottom: 1.6rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2563eb;
  margin-bottom: 0.55rem;
}

.hero-copy {
  max-width: 820px;
  color: #374151;
}

.callout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 1.1rem 0 1rem;
}

.callout-card {
  border: 1px solid #dbe4f3;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  border-radius: 0.9rem;
  padding: 0.95rem 1rem;
}

.callout-label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #2563eb;
  margin-bottom: 0.35rem;
}

.callout-value {
  display: block;
  font-weight: 600;
  color: #111827;
  line-height: 1.45;
}

.highlights-panel {
  background: #111827;
  color: #f9fafb;
  border-radius: 1rem;
  padding: 1rem 1rem 1.05rem;
  margin-top: 1rem;
}

.highlights-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #93c5fd;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.highlight-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.highlight-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(147, 197, 253, 0.35);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  font-size: 0.84rem;
  line-height: 1.2;
}

.diagram-card {
  margin: 0.9rem 0 0 0;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #f8fafc;
  padding: 1rem;
  overflow: hidden;
}

.diagram-card svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram-card rect {
  fill: #ffffff;
  stroke: #cbd5e1;
  stroke-width: 2;
}

.diagram-card line {
  stroke: #64748b;
  stroke-width: 2.5;
}

.diagram-card marker path {
  fill: #64748b;
}

.diagram-card figcaption {
  margin-top: 0.8rem;
  color: #475569;
  font-size: 0.88rem;
}

.svg-title {
  font-size: 18px;
  font-weight: 700;
  fill: #0f172a;
}

.svg-text {
  font-size: 14px;
  fill: #334155;
}

.architecture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.8rem;
}

.arch-block {
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  padding: 1rem;
  background: #ffffff;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

textarea {
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 1rem;
  font-family: inherit;
  min-height: 150px;
  resize: vertical;
}

.primary-btn {
  background-color: #111827;
  color: white;
  border: none;
  padding: 0.9rem 1.25rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.primary-btn:hover {
  background-color: #2563eb;
}

.primary-btn.loading {
  background-color: #1f2937;
  cursor: not-allowed;
  pointer-events: none;
}

.primary-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.2rem;
  height: 1.2rem;
  margin: -0.6rem 0 0 -0.6rem;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.upload-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  user-select: none;
}

.upload-zone small {
  display: block;
  opacity: 0.85;
  font-weight: 400;
  margin-top: 0.15rem;
}

.upload-zone.dragover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.15);
}

.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f3f4f6;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1;
  max-width: 100%;
  overflow: hidden;
}

.file-pill .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 520px;
}

.file-pill .clear {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.7;
  padding: 0;
}

.file-pill .clear:hover {
  opacity: 1;
}

.file-animate-in {
  animation: fileIn 0.35s ease forwards;
}

@keyframes fileIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-bar {
  width: 0%;
  height: 4px;
  background: #2563eb;
  border-radius: 2px;
  margin-top: 0.5rem;
  opacity: 1;
  transition:
    width 1s ease,
    opacity 0.6s ease;
}

.progress-bar.fade-out {
  opacity: 0;
}

.result {
  margin-top: 2rem;
  background-color: #f3f4f6;
  padding: 1.5rem;
  border-radius: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.hidden {
  display: none;
}

.match-item {
  margin-bottom: 0.75rem;
  background: white;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid #22c55e;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(10px);
}

.match-item.not {
  border-left-color: #ef4444;
}

.match-item span.icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  color: #22c55e;
}

.match-item.not span.icon {
  color: #ef4444;
}

@keyframes fadeInSeq {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

footer {
  margin-top: auto;
  margin-bottom: 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
  text-align: center;
}

.helper-text {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: -0.35rem;
}

.file-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: -0.35rem;
}

.dual-action-row {
  display: flex;
  gap: 0.75rem;
  width: 100%;
}

.dual-action-row > * {
  flex: 1 1 0;
  width: 50%;
}

.dual-action-row .primary-btn {
  width: 100%;
}

.sample-btn {
  background-color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sample-btn:hover {
  background-color: #1d4ed8;
}

@media (max-width: 880px) {
  .callout-grid,
  .architecture-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .dual-action-row {
    flex-direction: column;
  }
  .dual-action-row > * {
    width: 100%;
  }
  .nav-container {
    padding: 0.75rem 1rem;
  }
  .nav-right {
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .description-card {
    padding: 1.2rem;
  }
}
