:root {
  --bg: #0b1210;
  --border: rgba(187, 247, 208, 0.16);
  --text: #effaf2;
  --muted: #9eb4a6;
  --brand: #22c55e;
  --brand-2: #84cc16;
  --warning: #facc15;
  --shadow: 0 20px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 34%),
    linear-gradient(180deg, #0b1210, #07100c);
  color: var(--text);
}

.app-shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.app-header {
  padding: 20px 0 16px;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 12px;
  font-size: clamp(2.3rem, 10vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 4vw, 2rem);
  letter-spacing: -0.04em;
}

.app-header p,
.hint,
.formula-card p,
.status-card p {
  color: var(--muted);
}

.card {
  margin: 16px 0;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.04));
  box-shadow: var(--shadow);
}

.grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

.wide-field {
  grid-column: 1 / -1;
}

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

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0 14px;
  outline: none;
  background: rgba(5, 14, 10, 0.72);
  color: var(--text);
  font-size: 1rem;
}

input:focus {
  border-color: rgba(34, 197, 94, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.11);
}

.primary,
.secondary,
.time-button {
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 18px;
  padding: 0 18px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04110a;
}

.secondary,
.time-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

.time-button {
  margin: 12px 0 0;
  color: #bbf7d0;
}

.complete-button {
  border-color: rgba(250, 204, 21, 0.36);
  color: #fef9c3;
}

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

.results div {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(5, 14, 10, 0.56);
  box-shadow: var(--shadow);
}

.results span,
.results small {
  display: block;
  color: var(--muted);
  font-weight: 750;
}

.results strong {
  display: block;
  margin: 5px 0;
  color: #bbf7d0;
  font-size: clamp(1.8rem, 7vw, 3rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

#warningResult {
  color: var(--warning);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 18px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.85rem;
}

td {
  color: var(--text);
  font-weight: 750;
}

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

@media (max-width: 760px) {
  .grid.two,
  .results {
    grid-template-columns: 1fr;
  }

  .time-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 18px, 980px);
    padding-top: 14px;
  }

  .card {
    border-radius: 22px;
  }
}
