:root {
  --bg: #f2efe8;
  --bg-accent: #d7e4db;
  --panel: rgba(255, 252, 247, 0.9);
  --panel-strong: #fffdf8;
  --text: #1d2a24;
  --muted: #607067;
  --line: rgba(29, 42, 36, 0.12);
  --accent: #1f7a5c;
  --accent-dark: #185f47;
  --danger: #b7462d;
  --shadow: rgba(33, 46, 39, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(31, 122, 92, 0.14), transparent 28%),
    radial-gradient(circle at bottom left, rgba(134, 98, 64, 0.12), transparent 32%),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-accent) 100%);
}

.layout {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 56px;
}

.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  box-shadow: 0 24px 60px var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-panel {
  padding: 38px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  color: var(--muted);
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 0.95;
}

.intro {
  max-width: 42rem;
  margin-bottom: 28px;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--muted);
}

.query-form {
  display: grid;
  gap: 12px;
}

.field-label {
  font-size: 0.95rem;
  color: var(--muted);
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 14px;
}

.input {
  width: 100%;
  height: 56px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.input:focus {
  border-color: rgba(31, 122, 92, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 122, 92, 0.12);
  transform: translateY(-1px);
}

.button {
  height: 56px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent) 0%, #2a8d6c 100%);
  color: #f7fff9;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(31, 122, 92, 0.24);
  background: linear-gradient(135deg, var(--accent-dark) 0%, #217556 100%);
}

.feedback {
  min-height: 24px;
  margin-top: 16px;
  color: var(--muted);
}

.feedback.success {
  color: var(--accent-dark);
}

.feedback.error {
  color: var(--danger);
}

.result-panel {
  margin-top: 24px;
  padding: 30px;
  background: var(--panel-strong);
}

.result-header {
  margin-bottom: 20px;
}

.result-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
}

.result-list {
  display: grid;
  gap: 16px;
}

.usage-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 244, 237, 0.98));
}

.usage-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.usage-top h3 {
  margin-bottom: 6px;
  font-size: 1.3rem;
}

.usage-top p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.metric {
  padding: 16px;
  border-radius: 18px;
  background: rgba(31, 122, 92, 0.05);
}

.metric-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.metric strong {
  font-size: 1.05rem;
  line-height: 1.5;
}

.empty-state {
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
}

.hidden {
  display: none;
}

@media (max-width: 800px) {
  .layout {
    width: min(100% - 24px, 1080px);
    padding: 24px 0 40px;
  }

  .hero-panel,
  .result-panel {
    padding: 24px;
    border-radius: 22px;
  }

  .input-row,
  .metrics,
  .usage-top {
    grid-template-columns: 1fr;
    display: grid;
  }

  .button {
    width: 100%;
  }
}
