:root {
  color-scheme: light;
  --ink: #15151a;
  --muted: #64636f;
  --line: #dedce5;
  --paper: #f7f5f2;
  --surface: #ffffff;
  --accent: #1f8a70;
  --accent-strong: #11624f;
  --signal: #ffb000;
  --night: #202036;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

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

button,
input {
  font: inherit;
}

.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 6vw;
}

.brand,
.topnav {
  align-items: center;
  display: flex;
  gap: 14px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #fff;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.topnav {
  color: var(--muted);
  font-size: 15px;
}

.topnav a,
.ghost-button {
  border-radius: 8px;
  padding: 8px 10px;
}

.ghost-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
}

.hero {
  align-items: stretch;
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  padding: 56px 6vw 34px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 430px;
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

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

h1 {
  font-size: clamp(42px, 7vw, 78px);
  letter-spacing: 0;
  line-height: 0.98;
  margin-bottom: 22px;
  max-width: 880px;
}

.lede {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
  max-width: 720px;
}

.actions,
.input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button {
  align-items: center;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 750;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.primary-button {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
}

.secondary-button {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(31, 138, 112, 0.95), rgba(32, 32, 54, 0.98)),
    var(--night);
  border-radius: 8px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 430px;
  overflow: hidden;
  padding: 28px;
}

.pulse-row {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, 1fr);
  height: 210px;
}

.pulse-row span {
  background: linear-gradient(180deg, var(--signal), rgba(255, 255, 255, 0.14));
  border-radius: 6px 6px 0 0;
  min-height: 55px;
}

.pulse-row span:nth-child(1) {
  height: 46%;
}

.pulse-row span:nth-child(2) {
  height: 82%;
}

.pulse-row span:nth-child(3) {
  height: 60%;
}

.pulse-row span:nth-child(4) {
  height: 94%;
}

.preview-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}

.preview-grid div,
.metric,
.list-panel,
.chart-panel,
.account-panel,
.upload-area {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preview-grid div {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  padding: 16px;
}

.preview-grid strong {
  display: block;
  font-size: 25px;
}

.preview-grid small {
  color: rgba(255, 255, 255, 0.76);
}

.workspace,
.dashboard {
  padding: 34px 6vw;
}

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

.upload-area {
  align-items: center;
  border-style: dashed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
  padding: 34px;
  text-align: center;
}

.upload-area.is-dragging {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(31, 138, 112, 0.14);
}

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

.upload-icon {
  align-items: center;
  background: #f0efe9;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  font-size: 34px;
  font-weight: 300;
  height: 64px;
  justify-content: center;
  margin-bottom: 20px;
  width: 64px;
}

.upload-area p,
.account-panel p {
  color: var(--muted);
  line-height: 1.55;
  max-width: 620px;
}

.upload-status {
  background: #f0efe9;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 0;
  padding: 9px 12px;
}

.account-panel {
  padding: 24px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-bottom: 8px;
}

input[type="email"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  min-width: 0;
  padding: 0 12px;
}

.input-row input {
  flex: 1;
}

.session-state {
  background: #f0efe9;
  border-radius: 8px;
  margin: 18px 0 0;
  padding: 10px 12px;
}

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

.section-heading h2 {
  font-size: 34px;
  margin-bottom: 0;
}

.metric-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, 1fr);
}

.metric {
  padding: 20px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
}

.metric strong {
  font-size: 34px;
}

.analysis-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 14px;
}

.chart-panel {
  min-height: 260px;
  padding: 20px;
}

.chart-panel h3 {
  margin-bottom: 16px;
}

.bar-chart,
.split-chart {
  display: grid;
  gap: 10px;
}

.bar-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 82px minmax(0, 1fr) 74px;
}

.compact .bar-row {
  grid-template-columns: 42px minmax(0, 1fr) 74px;
}

.bar-label,
.bar-value {
  color: var(--muted);
  font-size: 13px;
}

.bar-value {
  text-align: right;
}

.bar-track {
  background: #eeeeea;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.bar-track span {
  background: var(--accent);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.hour-chart {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(12, 1fr);
}

.hour-cell {
  align-items: center;
  aspect-ratio: 1;
  background: var(--accent);
  border-radius: 6px;
  color: white;
  display: flex;
  font-size: 11px;
  font-weight: 800;
  justify-content: center;
}

.chart-empty {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.lists {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
}

.list-panel {
  min-height: 260px;
  padding: 20px;
}

.list-panel h3 {
  margin-bottom: 16px;
}

ol,
ul {
  margin: 0;
  padding-left: 22px;
}

li {
  line-height: 1.45;
  margin-bottom: 12px;
}

li span {
  color: var(--muted);
  display: block;
  font-size: 13px;
}

dialog {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(92vw, 420px);
}

dialog::backdrop {
  background: rgba(21, 21, 26, 0.46);
}

.dialog-card {
  padding: 24px;
  position: relative;
}

.dialog-card input,
.dialog-card .primary-button {
  width: 100%;
}

.close-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 24px;
  position: absolute;
  right: 16px;
  top: 12px;
}

@media (max-width: 900px) {
  .topbar,
  .topnav,
  .actions,
  .input-row {
    align-items: stretch;
  }

  .topbar,
  .hero,
  .workspace,
  .metric-grid,
  .analysis-grid,
  .lists {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    gap: 14px;
    padding-top: 16px;
  }

  .topnav {
    flex-wrap: wrap;
  }

  .hero-copy,
  .hero-panel {
    min-height: auto;
  }

  .preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero,
  .workspace,
  .dashboard {
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    font-size: 40px;
  }

  .primary-button,
  .secondary-button,
  .actions a,
  .actions button {
    width: 100%;
  }
}
