:root {
  --bg: #171717;
  --panel: #232323;
  --panel-strong: #2b2b2b;
  --text: #f1eee8;
  --muted: #b5ada2;
  --line: #3b3936;
  --accent: #9eb08f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Source Sans 3", sans-serif;
  color: var(--text);
  background: #141414;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
}

h1,
h2,
.result-card strong {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.1;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  border-radius: 8px;
  padding: 20px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.3rem;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.input-panel {
  display: grid;
  gap: 16px;
  align-content: start;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 600;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel-strong);
}

.step-controls {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.step-button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #343434;
  color: var(--text);
  font: inherit;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.step-button:hover {
  background: #3d3d3d;
}

.step-button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

.input-wrap:focus-within {
  border-color: var(--accent);
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 13px 0;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}

.suffix {
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 700;
}

.results-panel {
  display: grid;
  gap: 18px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.result-card {
  padding: 16px;
  border-radius: 4px;
  background: #2a2a2a;
  border: 1px solid var(--line);
}

.result-card.accent {
  background: #2d332c;
}

.result-card.accent-soft {
  background: #322d28;
}

.result-label {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
}

.result-card strong {
  display: block;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1;
}

.result-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.details-list {
  display: grid;
  gap: 8px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 4px;
  background: #272727;
  border: 1px solid var(--line);
}

.detail-row span {
  color: var(--muted);
}

@media (max-width: 860px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 16px 0 24px;
  }

  .panel {
    padding: 16px;
  }

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

  .detail-row {
    flex-direction: column;
  }
}
