:root {
  --bg: #f3f0e8;
  --surface: #fffdf8;
  --surface-soft: #f7f3ea;
  --line: #d9d1c3;
  --ink: #1f1b16;
  --muted: #6e655b;
  --accent: #1e6f5c;
  --accent-soft: #e2efe9;
  --shadow: 0 10px 30px rgba(47, 39, 28, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(30, 111, 92, 0.08), transparent 26%),
    linear-gradient(180deg, #faf7f1 0%, var(--bg) 100%);
  color: var(--ink);
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 56px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.brand-block {
  max-width: 640px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: none;
  color: var(--accent);
}

.hero-copy {
  max-width: 46ch;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 8px;
}

h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

h2 {
  margin: 0 0 10px;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

p {
  margin: 0 0 14px;
}

section {
  margin-bottom: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.jobs-count {
  margin: 0;
  white-space: nowrap;
}

.popular-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.popular-link {
  display: inline-block;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.94rem;
}

.popular-link:hover {
  background: var(--accent-soft);
}

form {
  margin-bottom: 16px;
}

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

.stack-grid .full-span {
  grid-column: 1 / -1;
}

fieldset {
  margin: 0 0 14px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
}

legend {
  padding: 0 6px;
  font-weight: 700;
  color: var(--ink);
}

label {
  color: var(--ink);
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: white;
  color: var(--ink);
}

input[type="radio"] {
  width: auto;
  margin-right: 8px;
}

textarea {
  min-height: 120px;
}

button {
  padding: 10px 16px;
  border: 1px solid #195847;
  border-radius: 0;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}

.topbar-button {
  display: inline-block;
  padding: 8px 13px;
  font-size: 0.9rem;
  min-height: 0;
  border: 1px solid #195847;
  background: var(--accent);
  color: white;
  text-decoration: none;
}

.topbar-button:hover {
  background: #195847;
  color: white;
}

.secondary-action {
  background: transparent;
  color: var(--accent);
  border-color: rgba(30, 111, 92, 0.35);
}

.secondary-action:hover {
  background: rgba(30, 111, 92, 0.08);
  color: #195847;
}

button:hover {
  background: #195847;
  transform: translateY(-1px);
}

button[type="reset"] {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.hidden {
  display: none;
}

.muted {
  color: var(--muted);
}

.jobs-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.filters-sidebar {
  position: sticky;
  top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-soft);
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.filters-title {
  margin-bottom: 14px;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.item,
.session-box,
.conversation-card,
.chat-bubble,
.empty,
.stat {
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 0;
  background: white;
  box-shadow: 0 4px 14px rgba(47, 39, 28, 0.04);
}

.item {
  max-width: 100%;
  padding: 22px;
}

.item h3 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.item p:last-child {
  margin-bottom: 0;
}

.job-card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 14px;
}

.job-subline {
  margin-bottom: 0;
}

.job-pay {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  white-space: nowrap;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.job-tag {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-size: 0.88rem;
}

.job-description {
  color: var(--ink);
  margin-bottom: 14px;
}

.job-meta-grid {
  display: grid;
  gap: 10px;
  color: var(--muted);
}

.session-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.stat {
  display: inline-block;
  min-width: 140px;
  margin-right: 12px;
}

.stat strong {
  display: block;
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.profile-card {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  background: white;
}

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

.profile-item strong {
  display: block;
  margin-bottom: 4px;
}

.profile-item p {
  margin: 0;
  color: var(--muted);
}

.profile-item-wide {
  margin-top: 16px;
}

.conversation-card {
  width: 100%;
  text-align: left;
  margin-bottom: 12px;
}

.chat-bubble.mine {
  background: var(--accent-soft);
}

.status {
  margin-top: 16px;
  font-weight: 600;
}

.status.error {
  color: #b00020;
}

.status.success {
  color: #0f5d34;
}

@media (max-width: 900px) {
  main {
    padding: 22px 16px 40px;
  }

  .topbar,
  .section-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .job-card-top {
    flex-direction: column;
  }

  .jobs-layout {
    grid-template-columns: 1fr;
  }

  .stack-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    position: static;
  }

  .session-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
