@font-face {
  font-family: 'Suisse';
  src: url('/suisse.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Suisse', 'Segoe UI', system-ui, sans-serif;
  background: #f5f5f5;
  color: #1e1e1e;
  min-height: 100vh;
  padding: 24px 16px;
}

@media (min-width: 768px) {
  body {
    padding: 48px 24px;
  }
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

h1 {
  font-size: 4.0rem;
  font-weight: 900;
  color: #217346;
  margin-bottom: 12px;
}

h1 a {
  text-decoration: none;
  color: inherit;
}

@media (min-width: 768px) {
  h1 {
    font-size: 3.5rem;
  }
}

.subtitle {
  color: #5f5f5f;
  font-size: 1.43rem;
  margin-bottom: 36px;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .subtitle {
    font-size: 1.56rem;
  }
}

/* --- Upload Box --- */
.upload-box {
  border: 3px dashed #217346;
  border-radius: 16px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(33, 115, 70, 0.1);
}

@media (min-width: 768px) {
  .upload-box {
    padding: 64px 32px;
  }
}

.upload-box:hover, .upload-box.dragover {
  border-color: #185c37;
  background: #f0f7f4;
  box-shadow: 0 4px 16px rgba(33, 115, 70, 0.15);
  transform: translateY(-2px);
}

.upload-box input[type="file"] { display: none; }

.upload-icon {
  margin-bottom: 16px;
  display: block;
  text-align: center;
}

.upload-icon svg { 
  width: 62px;
  fill: #217346;
}

@media (min-width: 768px) {
  .upload-icon svg {
    width: 84px;
  }
}

.upload-box p { 
  color: #217346; 
  font-size: 1.43rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  .upload-box p {
    font-size: 1.625rem;
  }
}

.upload-box .supported { 
  font-size: 1.235rem; 
  color: #5f5f5f; 
  margin-top: 8px;
}

@media (min-width: 768px) {
  .upload-box .supported {
    font-size: 1.3rem;
  }
}

/* --- Status / Error --- */
.status {
  margin-top: 24px;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1.3rem;
  display: none;
  font-weight: 500;
}

@media (min-width: 768px) {
  .status {
    font-size: 1.43rem;
    padding: 18px 24px;
  }
}

.status.visible { display: block; }
.status.info    { background: #e7f4ee; border: 2px solid #217346; color: #185c37; }
.status.error   { background: #fde7e7; border: 2px solid #c13438; color: #8b1f23; }
.status.success { background: #e7f4ee; border: 2px solid #217346; color: #185c37; }

/* --- Results --- */
.results { margin-top: 40px; display: none; }
.results.visible { display: block; }

.section-label {
  font-size: 1.105rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #217346;
  margin-bottom: 14px;
  font-weight: 700;
}

@media (min-width: 768px) {
  .section-label {
    font-size: 1.17rem;
    margin-bottom: 16px;
  }
}

.card {
  background: #ffffff;
  border: 2px solid #217346;
  border-radius: 12px;
  padding: 24px 20px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(33, 115, 70, 0.08);
}

@media (min-width: 768px) {
  .card {
    padding: 28px 32px;
    margin-bottom: 32px;
  }
}

.card .description {
  color: #1e1e1e;
  line-height: 1.6;
  font-size: 1.365rem;
}

@media (min-width: 768px) {
  .card .description {
    font-size: 1.495rem;
  }
}

/* Buckets */
.bucket-list { list-style: none; padding: 0; }
.bucket-list li {
  padding: 10px 0;
  color: #1e1e1e;
  font-size: 1.3rem;
  border-bottom: 1px solid #e0e0e0;
}

@media (min-width: 768px) {
  .bucket-list li {
    font-size: 1.404rem;
    padding: 12px 0;
  }
}

.bucket-list li:last-child { border-bottom: none; }
.bucket-list .bucket-name { color: #217346; font-weight: 700; }

/* Insights */
.insights-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .insights-list {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

.insights-list li {
  padding: 0;
  color: #1e1e1e;
  line-height: 1.5;
  border-bottom: none;
  position: relative;
  display: flex;
  flex-direction: column;
}

.insights-list li:before {
  display: none;
}

.insights-list .insight-title {
  font-size: 1.43rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.788);
  margin-bottom: 8px;
  line-height: 1.4;
}

@media (min-width: 768px) {
  .insights-list .insight-title {
    font-size: 1.56rem;
  }
}

.insights-list .insight-body {
  font-size: 1.035rem;
  color: rgba(0, 0, 0, 0.671);
  line-height: 1.6;
}

@media (min-width: 768px) {
  .insights-list .insight-body {
    font-size: 1.14rem;
  }
}

/* Stats badge */
.stats-badge {
  display: inline-block;
  background: #217346;
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .57rem;
  margin-right: 10px;
  font-family: courier;
  text-transform: uppercase;
  margin-bottom: 10px;
}

@media (min-width: 768px) {
  .stats-badge {
    font-size: .77rem;
    padding: 8px 16px;
  }
}

/* Sample Table */
.table-wrap { 
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
}

/* --- Examples Section --- */
.examples-section {
  margin-top: 48px;
}

.examples-section.hidden {
  display: none;
}

.examples-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: rgba(0,0,0,0.788);
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .examples-title {
    font-size: 1.82rem;
  }
}

.examples-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 768px) {
  .examples-grid {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
}

.example-card {
  background: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 16px;
}

.example-card:hover {
  border-color: #217346;
  box-shadow: 0 4px 12px rgba(33, 115, 70, 0.15);
  transform: translateY(-2px);
}

.example-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #e7f4ee;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.example-icon svg {
  width: 28px;
  height: 28px;
  fill: #217346;
}

.example-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e1e1e;
}

@media (min-width: 768px) {
  .example-name {
    font-size: 1.43rem;
  }
}

/* Sample Table */
.table-wrap { 
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #ffffff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.235rem;
  min-width: 100%;
}

@media (min-width: 768px) {
  table {
    font-size: 1.3rem;
  }
}

th {
  background: #217346;
  color: #ffffff;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 3px solid #185c37;
  border-right: 1px solid #185c37;
  font-weight: 700;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

th:last-child {
  border-right: none;
}

@media (min-width: 768px) {
  th {
    padding: 14px 18px;
  }
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid #e0e0e0;
  border-right: 1px solid #f0f0f0;
  color: #1e1e1e;
  white-space: nowrap;
}

td:last-child {
  border-right: none;
}

tr:nth-child(even) { background: #f9f9f9; }

/* Spinner */
.spinner-wrap { text-align: center; padding: 40px 0; display: none; }
.spinner-wrap.visible { display: block; }
.spinner {
  display: inline-block;
  width: 48px; 
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #217346;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spinner-wrap p { 
  color: #5f5f5f; 
  margin-top: 16px; 
  font-size: 1.3rem;
  font-weight: 500;
}

@media (min-width: 768px) {
  td {
    padding: 12px 18px;
  }
}

/* Insights Loading State */
.insights-loading {
  text-align: center;
  padding: 40px 20px;
  color: #5f5f5f;
  font-size: 1.3rem;
  grid-column: 1 / -1;
}

.insights-loading .spinner {
  margin: 0 auto 16px;
}

/* Terms Disclaimer */
.terms-disclaimer {
  font-size: 0.9rem;
  color: #5f5f5f;
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .terms-disclaimer {
    font-size: 0.95rem;
    margin-top: 20px;
  }
}

.terms-disclaimer a {
  color: #217346;
  text-decoration: underline;
}

.terms-disclaimer a:hover {
  color: #185c37;
}