:root {
  color-scheme: light;
  --ink: #16211f;
  --muted: #60706c;
  --line: #d9e2de;
  --paper: #f7f4ef;
  --panel: #ffffff;
  --brand: #0f766e;
  --accent: #f59e0b;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.topbar {
  min-height: 72px;
  padding: 14px clamp(16px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.topbar div { display: grid; gap: 2px; }
.topbar strong { font-size: 1.1rem; }
.topbar span, .status { color: var(--muted); font-size: .92rem; }
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-actions a, .profile-link {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--brand);
  background: #edf8f6;
  font-weight: 700;
}

.shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 24px;
}
.profile-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 4vw, 44px);
}

.request-panel, .results-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(18px, 3vw, 28px);
}

h1, h2 { margin: 0 0 18px; line-height: 1.05; }
h1 { font-size: clamp(2rem, 5vw, 4.3rem); max-width: 760px; }
h2 { font-size: 1.2rem; }

form, label { display: grid; gap: 8px; }
form { gap: 16px; }
label { font-size: .9rem; color: var(--muted); }
.form-note {
  align-self: end;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
  padding: 0 0 8px;
}
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 46px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
textarea { min-height: 120px; resize: vertical; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
button {
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--brand);
  color: white;
}
.icon-btn {
  width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  background: #edf8f6;
  color: var(--brand);
}
.cards { display: grid; gap: 12px; margin-top: 16px; }
.history { display: grid; gap: 14px; margin-top: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  gap: 8px;
  background: #fbfdfc;
}
.history-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 10px;
  background: #fbfdfc;
}
.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.quote-list {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.quote {
  border-left: 4px solid var(--brand);
  background: #eef8f6;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 5px;
}
.quote span { color: var(--muted); font-size: .92rem; }
.quote p, .history-card p { margin: 0; }
.card strong { font-size: 1rem; }
.meta { color: var(--muted); font-size: .9rem; }
.badge {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff4dc;
  color: #8a5600;
  font-size: .78rem;
  font-weight: 700;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(12, 20, 18, .42);
}
.modal[hidden] { display: none; }
.modal-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 22px;
  display: grid;
  gap: 12px;
  box-shadow: 0 20px 60px rgba(12, 20, 18, .22);
}
.modal-panel p { margin: 0; color: var(--muted); }
.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #dce8e4;
}
.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width .25s ease;
}

@media (max-width: 840px) {
  .shell { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  h1 { font-size: 2.45rem; }
  .topbar { align-items: stretch; flex-direction: column; }
  .nav-actions { justify-content: space-between; }
}
