:root {
  --bg: #f6f2ea;
  --card: #fffaf0;
  --ink: #18211f;
  --muted: #67706d;
  --line: rgba(24, 33, 31, 0.13);
  --primary: #135c55;
  --primary-2: #0d403b;
  --accent: #d97706;
  --danger: #a83f39;
  --shadow: 0 24px 70px rgba(28, 39, 35, 0.16);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(217, 119, 6, 0.18), transparent 34rem),
    linear-gradient(135deg, #f7efe1 0%, #f6f2ea 38%, #e7f0eb 100%);
  min-height: 100vh;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hero {
  min-height: 520px;
  color: #fff;
  background:
    linear-gradient(115deg, rgba(8, 30, 28, 0.91), rgba(13, 64, 59, 0.72)),
    url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80") center/cover;
  border-bottom-left-radius: 46px;
  border-bottom-right-radius: 46px;
  box-shadow: var(--shadow);
  padding: 24px clamp(18px, 5vw, 72px) 84px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.24);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: rgba(255, 255, 255, 0.75);
}

.nav-actions,
.hero-actions,
.input-actions,
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-actions {
  justify-content: flex-end;
}

.nav-link {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
}

.nav-link.is-active,
.nav-link:hover {
  background: #fff;
  color: var(--primary-2);
}

.hero-content {
  width: min(790px, 100%);
  margin-top: 112px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero .eyebrow {
  color: #fbbf24;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 0.91;
  letter-spacing: -0.08em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.97;
  letter-spacing: -0.06em;
  margin-bottom: 12px;
}

h3 {
  margin-bottom: 6px;
}

.hero-content p:not(.eyebrow),
.section-heading p,
.hint,
.preview-entry p {
  color: var(--muted);
}

.hero-content p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.12rem;
  line-height: 1.7;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 13px 19px;
  font-weight: 800;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 16px 28px rgba(13, 64, 59, 0.2);
}

.secondary {
  color: var(--primary-2);
  background: #e5f2ed;
}

.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.ghost-dark {
  color: var(--ink);
  background: rgba(24, 33, 31, 0.08);
}

.danger {
  color: #fff;
  background: var(--danger);
}

.wide {
  width: 100%;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: -54px auto 64px;
}

.panel {
  background: rgba(255, 250, 240, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: clamp(20px, 4vw, 42px);
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading p {
  max-width: 720px;
  line-height: 1.6;
  margin-bottom: 0;
}
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.pillar-card {
  position: relative;
  min-height: 252px;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  padding: 0;
  color: #fff;
  text-align: left;
  background: #102c2a;
  box-shadow: 0 18px 42px rgba(16, 44, 42, 0.21);
}

.pillar-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--image) center/cover;
  transform: scale(1.03);
  transition: transform 240ms ease;
}

.pillar-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 16, 15, 0.08), rgba(3, 16, 15, 0.82));
}

.pillar-card:hover::before {
  transform: scale(1.08);
}

.pillar-card.is-selected {
  outline: 4px solid #fbbf24;
}

.pillar-content {
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  padding: 24px;
}

.pillar-content h3 {
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pillar-content p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

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

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 800;
}

.log-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
  gap: 22px;
}

.input-card,
.preview-card,
.import-card {
  background: #fffdf7;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 900;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  color: var(--ink);
  background: #fffcf5;
  line-height: 1.6;
}

textarea:focus {
  outline: 3px solid rgba(19, 92, 85, 0.18);
  border-color: var(--primary);
}

.input-actions {
  margin-top: 14px;
}

.hint {
  margin: 14px 0 0;
  line-height: 1.5;
}

.import-card {
  margin-top: 22px;
}

.import-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.import-controls input[type="file"] {
  flex: 1 1 320px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 14px;
  background: #fffbf2;
}

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

#previewCount {
  border-radius: 999px;
  padding: 8px 11px;
  background: #f3eadb;
  font-weight: 900;
}

.preview-list {
  display: grid;
  gap: 12px;
  max-height: 430px;
  overflow: auto;
  margin-bottom: 16px;
}

.preview-entry {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px;
  background: #fffbf2;
}

.preview-entry p {
  margin-bottom: 12px;
}

dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  font-weight: 900;
}

.empty-state {
  margin: 0;
  padding: 18px;
  color: var(--muted);
  background: rgba(24, 33, 31, 0.05);
  border-radius: 18px;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.summary-strip article {
  border-radius: 20px;
  padding: 18px;
  background: #fffdf7;
  border: 1px solid var(--line);
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.summary-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 2rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fffdf7;
}

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

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.pillar-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--primary-2);
  background: #e5f2ed;
  font-weight: 900;
}

.delete-row {
  color: var(--danger);
  background: transparent;
  border: 0;
  font-weight: 900;
}

@media (max-width: 1040px) {
  .pillar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .log-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero {
    border-bottom-left-radius: 28px;
    border-bottom-right-radius: 28px;
  }

  .topbar,
  .section-heading {
    display: block;
  }

  .nav-actions,
  .section-heading .button,
  .table-actions {
    margin-top: 16px;
  }

  .hero-content {
    margin-top: 68px;
  }

  .pillar-grid,
  .summary-strip,
  dl {
    grid-template-columns: 1fr;
  }
}
