:root {
  --brand-900: #0a5b45;
  --brand-800: #0c7f5f;
  --brand-700: #13906c;
  --ink-950: #143532;
  --ink-800: #2a5550;
  --ink-700: #4d6f6b;
  --surface-100: #f4f8f6;
  --surface-200: #f7fbf9;
  --surface-300: #dcece5;
  --accent-500: #f19a2a;
  --accent-600: #da8314;
  --accent-200: rgba(241, 154, 42, 0.16);
  --success-600: #1f7a54;
  --danger-600: #8e2f2f;
  --shadow: 0 20px 46px rgba(10, 91, 69, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--ink-950);
  background:
    radial-gradient(circle at top right, rgba(19, 144, 108, 0.23), transparent 32%),
    radial-gradient(circle at bottom left, rgba(241, 154, 42, 0.14), transparent 34%),
    linear-gradient(135deg, #eff8f4 0%, #f7fbf9 48%, #f2f8f6 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: linear-gradient(90deg, var(--brand-900), var(--brand-800));
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.topbar-inner {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-inner h1 {
  margin: 0;
  font-size: 2rem;
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  height: 3rem;
  width: auto;
}

.brand-logo {
  display: block;
  width: clamp(168px, 18vw, 240px);
  height: auto;
}

.topbar-badge {
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(241, 154, 42, 0.92);
  padding: 10px 16px;
  border-radius: 999px;
}

.page-shell {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.tutorial-panel {
  margin-bottom: 24px;
  padding: 24px 26px;
  background:
    linear-gradient(135deg, rgba(12, 127, 95, 0.96), rgba(15, 111, 87, 0.96)),
    linear-gradient(40deg, rgba(241, 154, 42, 0.14), transparent 42%);
  color: #fff;
}

.tutorial-header h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
}

.tutorial-eyebrow {
  margin: 30px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.86);
}

.tutorial-list {
  margin: 16px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  line-height: 1.6;
}

.tutorial-list li {
  padding-left: 4px;
}

.tutorial-list a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.tutorial-list strong {
  color: #fff;
}

.hero {
  gap: 24px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero-main {
  background:
    linear-gradient(130deg, rgba(12, 127, 95, 0.9), rgba(19, 144, 108, 0.84)),
    linear-gradient(45deg, rgba(241, 154, 42, 0.08), transparent 45%);
  color: #fff;
  border-radius: 24px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.86);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 1;
  max-width: 13ch;
}

.hero-copy {
  margin: 16px 0 0;
  max-width: 50ch;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.92);
}

.hero-card,
.panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(12, 127, 95, 0.12);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.hero-stat {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(219, 243, 234, 0.78));
  border: 1px solid rgba(12, 127, 95, 0.12);
}

.hero-stat span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-900);
}

.hero-stat strong {
  font-size: 1.15rem;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 460px) minmax(0, 1fr);
  gap: 24px;
}

.panel {
  padding: 22px;
}

label {
  display: block;
  margin-bottom: 12px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

input[type="file"] {
  width: 100%;
  border: 1px solid rgba(12, 127, 95, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-800);
}

input[type="file"]:focus {
  outline: 2px solid rgba(19, 144, 108, 0.28);
  border-color: rgba(19, 144, 108, 0.45);
}

.helper-text {
  margin: 8px 0 18px;
  color: var(--ink-700);
  font-size: 0.9rem;
}

textarea {
  width: 100%;
  min-height: 460px;
  resize: vertical;
  border: 1px solid rgba(12, 127, 95, 0.2);
  border-radius: 20px;
  padding: 18px;
  font: inherit;
  line-height: 1.5;
  color: var(--ink-950);
  background: rgba(255, 255, 255, 0.92);
}

textarea:focus {
  outline: 2px solid rgba(19, 144, 108, 0.28);
  border-color: rgba(19, 144, 108, 0.45);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, opacity 150ms ease, background-color 150ms ease;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.primary-button:hover:not(:disabled) {
  background: var(--brand-900);
}

.secondary-button {
  background: var(--accent-500);
  color: #fff;
}

.secondary-button:hover:not(:disabled) {
  background: var(--accent-600);
}

.ghost-button {
  background: transparent;
  color: var(--brand-900);
  border: 1px solid rgba(12, 127, 95, 0.22);
}

.status-message,
#resultSummary {
  margin: 14px 0 0;
  color: var(--ink-700);
  line-height: 1.5;
}

.status-message.is-success {
  color: var(--success-600);
}

.status-message.is-error {
  color: var(--danger-600);
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.table-wrapper {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(12, 127, 95, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

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

thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(12, 127, 95, 0.1);
  text-align: left;
  vertical-align: top;
  font-size: 0.92rem;
}

th {
  background: #e2f2ec;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:nth-child(even) {
  background: rgba(219, 243, 234, 0.34);
}

.empty-state {
  padding: 24px;
  text-align: center;
  color: var(--ink-700);
}

@media (max-width: 1080px) {

  .hero,
  .workspace {
    grid-template-columns: 1fr;
  }

  textarea {
    min-height: 320px;
  }

  .hero-main {
    padding: 26px;
  }

  .tutorial-panel {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    width: min(100% - 20px, 1400px);
    min-height: 72px;
  }

  .topbar-badge {
    font-size: 0.72rem;
    padding: 8px 12px;
  }

  .page-shell {
    width: min(100% - 20px, 1400px);
    padding-top: 20px;
  }

  .panel,
  .hero-card {
    border-radius: 20px;
  }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}