/* BorrowBuddy pilot marketplace. Palette and type match the original concept page (mvp.html on jakeyjac.com). */
:root {
  color-scheme: light;
  --ink: #173c36;
  --muted: #53665e;
  --paper: #f7f5eb;
  --card: #fffefa;
  --green: #245c4b;
  --green-dark: #173f35;
  --lime: #d7ed9b;
  --orange: #eaa66f;
  --line: #dce3d6;
  --sand: #ecebdc;
  --sage: #e9eddd;
  --danger: #a5402c;
  --danger-bg: #fbeae4;
  --warn-bg: #fdf0df;
  --focus: #2f7a63;
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

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

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.view:focus {
  outline: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--green-dark);
  color: white;
  font-weight: 700;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

/* ---------- Header & nav ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  flex: none;
  margin-right: auto;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav-account {
  flex: none;
}

.nav a {
  position: relative;
  flex: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--sand);
}

.nav a[aria-current="page"] {
  background: var(--lime);
}

.nav .nav-cta {
  background: var(--green);
  color: white;
}

.nav .nav-cta:hover,
.nav .nav-cta[aria-current="page"] {
  background: var(--green-dark);
  color: white;
}

.nav-badge {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  place-items: center;
  border-radius: 999px;
  background: var(--orange);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
}

.demo-banner {
  padding: 10px 20px;
  background: var(--warn-bg);
  border-bottom: 1px solid #f0d7b6;
  font-size: 0.88rem;
  text-align: center;
}

.demo-banner button {
  margin-left: 8px;
}

/* ---------- Layout ---------- */

.view {
  min-height: 60vh;
  padding: 36px 0 72px;
}

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

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  letter-spacing: -0.05em;
  line-height: 1.02;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  margin-bottom: 6px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.lede {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.1rem;
}

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

.fine-print {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.page-head {
  margin-bottom: 28px;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-underline-offset: 4px;
}

.section-block {
  margin-top: 44px;
}

.section-block > h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.count {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

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

.panel + .panel {
  margin-top: 16px;
}

.panel-title {
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.notice {
  margin: 0 0 24px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--sage);
  color: var(--ink);
  font-size: 0.92rem;
}

.notice.warn {
  border-color: #f0d7b6;
  background: var(--warn-bg);
}

.notice.error {
  border-color: #efc6ba;
  background: var(--danger-bg);
}

.empty {
  padding: 40px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
}

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

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  background: var(--green);
  color: white;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--green-dark);
}

.button:disabled {
  background: #71847b;
  cursor: progress;
}

.button.secondary {
  border: 1.5px solid var(--green);
  background: transparent;
  color: var(--green-dark);
}

.button.secondary:hover {
  background: var(--sage);
}

.button.danger {
  border: 1.5px solid var(--danger);
  background: transparent;
  color: var(--danger);
}

.button.danger:hover {
  background: var(--danger-bg);
}

.button.small {
  min-height: 38px;
  padding: 7px 15px;
  font-size: 0.9rem;
}

.link-button {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--green-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.link-button.subtle {
  color: var(--muted);
  font-weight: 600;
}

.text-link {
  color: var(--green-dark);
  font-weight: 700;
  text-underline-offset: 4px;
}

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

/* ---------- Forms ---------- */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.field > span:first-child,
.field-label {
  font-size: 0.92rem;
  font-weight: 700;
}

.field small,
.hint {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
}

p.hint {
  margin: -8px 0 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: white;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  outline: none;
  box-shadow: 0 0 0 3px rgba(47, 122, 99, 0.18);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.money-input {
  position: relative;
  display: block;
}

.money-input::before {
  content: "$";
  position: absolute;
  top: 50%;
  left: 14px;
  color: var(--muted);
  transform: translateY(-50%);
}

.money-input input {
  padding-left: 28px;
}

.check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.check input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--green);
}

.form-status {
  min-height: 1.4em;
  margin: 10px 0 0;
  font-size: 0.88rem;
}

.form-status:empty {
  min-height: 0;
  margin: 0;
}

.form-status.error {
  color: var(--danger);
  font-weight: 650;
}

.form-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.tabs {
  display: inline-flex;
  margin-bottom: 20px;
  padding: 4px;
  border-radius: 999px;
  background: var(--sand);
}

.tabs button {
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  background: var(--card);
  box-shadow: 0 2px 8px rgba(23, 60, 54, 0.12);
}

.narrow {
  max-width: 520px;
}

/* ---------- Browse ---------- */

.browse-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  margin-bottom: 26px;
}

.browse-hero h1 {
  max-width: 640px;
}

.filters {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
}

.search input {
  max-width: 520px;
  border-radius: 999px;
  padding-left: 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  padding: 7px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--green);
}

.chip[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.result-count {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
}

.item-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.item-card:hover {
  box-shadow: 0 14px 34px rgba(23, 60, 54, 0.12);
  transform: translateY(-2px);
}

.card-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--sand);
}

.placeholder {
  display: grid;
  place-items: center;
  background: var(--sand);
  font-size: 3.4rem;
}

.card-body {
  display: grid;
  gap: 2px;
  padding: 14px 16px 16px;
}

.card-body h3 {
  margin: 0;
}

.card-meta {
  margin: 0;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-price {
  margin: 2px 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.card-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  vertical-align: middle;
}

.badge.neutral {
  background: var(--sand);
}

.stars {
  color: #9a5a1f;
  font-weight: 800;
  letter-spacing: 0.04em;
}

/* ---------- Item page ---------- */

.item-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: start;
}

.gallery-main {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--sand);
}

.gallery-main.placeholder {
  font-size: 6rem;
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 14px;
  background: var(--sand);
  cursor: pointer;
}

.thumb[aria-pressed="true"] {
  border-color: var(--green);
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item-title {
  font-size: clamp(1.9rem, 4vw, 2.7rem);
}

.item-price {
  margin-bottom: 18px;
  font-size: 1.6rem;
  font-weight: 800;
}

.facts {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.facts div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.facts dd {
  margin: 0;
}

.facts small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.8rem;
}

.description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.estimate {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--sage);
  font-weight: 700;
}

.mini-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.mini-list li + li {
  margin-top: 6px;
}

.comment-list,
.review-list {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.comment,
.review {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.comment-head time {
  color: var(--muted);
}

.comment p,
.review p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-form {
  display: grid;
  gap: 8px;
  max-width: 640px;
}

.comment-form .field {
  margin: 0;
}

.comment-form .button {
  justify-self: start;
}

.rating-summary {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}

.rating-summary strong {
  font-size: 1.6rem;
}

/* ---------- Listing form photos ---------- */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.photo-tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--sand);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-tile .cover-tag {
  position: absolute;
  left: 6px;
  bottom: 6px;
}

.photo-tile .remove-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 60, 54, 0.82);
  color: white;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.photo-add {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: center;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: var(--card);
  color: var(--green-dark);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.photo-add:hover,
.photo-add:focus-within {
  border-color: var(--green);
}

.photo-add input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Activity ---------- */

.request-list {
  display: grid;
  gap: 14px;
}

.request-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.request-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-bottom: 6px;
}

.request-head a {
  font-size: 1.05rem;
  font-weight: 800;
}

.request-card p {
  margin-bottom: 6px;
}

.request-card .actions {
  margin-top: 12px;
}

.timeline {
  color: var(--muted);
  font-size: 0.82rem;
}

.note {
  padding: 8px 12px;
  border-left: 3px solid var(--lime);
  background: var(--paper);
  font-size: 0.92rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hint-box {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--sage);
  font-size: 0.86rem;
}

.hint-box.warn {
  background: var(--warn-bg);
}

.status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--sand);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pending {
  background: var(--warn-bg);
  color: #7a4512;
}

.status-accepted,
.status-picked_up {
  background: var(--lime);
}

.status-returned {
  background: var(--green);
  color: white;
}

.status-declined,
.status-cancelled {
  background: #ececea;
  color: var(--muted);
}

.thread {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--paper);
}

.thread ol {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.bubble {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 0.92rem;
}

.bubble.mine {
  justify-self: end;
  background: var(--sage);
}

.bubble p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble small {
  color: var(--muted);
  font-size: 0.75rem;
}

.thread form {
  display: flex;
  gap: 8px;
}

.thread form input {
  flex: 1;
}

.review-form {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--sage);
}

.rating-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
}

.rating-picker legend {
  margin-bottom: 6px;
  font-size: 0.92rem;
  font-weight: 700;
}

.rating-picker label {
  position: relative;
}

.rating-picker input {
  position: absolute;
  opacity: 0;
}

.rating-picker span {
  display: inline-block;
  padding: 6px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-weight: 700;
  cursor: pointer;
}

.rating-picker input:checked + span {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.rating-picker input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.listing-row {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.listing-row + .listing-row {
  margin-top: 10px;
}

.listing-row .thumb-img {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  font-size: 2rem;
}

.listing-row h3 a {
  text-decoration: none;
}

.listing-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

/* ---------- Team dashboard ---------- */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-bottom: 20px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 650;
}

.toolbar select {
  width: auto;
  min-height: 38px;
  padding: 6px 12px;
}

.toolbar input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.tile {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
}

.tile-label {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.tile-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.tile-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

th,
td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--sage);
  font-size: 0.8rem;
  font-weight: 750;
  white-space: nowrap;
}

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

td.num,
th.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

td .note-input {
  min-height: 34px;
  min-width: 160px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: 0.85rem;
}

.window-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.window-sprint {
  background: var(--lime);
}

.window-before,
.window-after {
  background: #ececea;
  color: var(--muted);
}

.export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}

.report-card + .report-card {
  margin-top: 10px;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.about-grid .panel ul {
  margin: 0;
  padding-left: 20px;
}

.about-grid .panel li + li {
  margin-top: 6px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
  padding: 0;
  list-style: none;
}

.steps li {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  place-items: center;
  border-radius: 50%;
  background: var(--lime);
  font-weight: 850;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---------- Dialog & toast ---------- */

.dialog {
  width: min(520px, calc(100% - 32px));
  padding: 26px;
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(23, 60, 54, 0.25);
}

.dialog::backdrop {
  background: rgba(23, 60, 54, 0.45);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--green-dark);
  color: white;
  font-weight: 650;
  box-shadow: 0 14px 34px rgba(23, 60, 54, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: var(--danger);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 26px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p {
  margin-bottom: 6px;
}

.site-footer a {
  font-weight: 650;
  text-underline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (min-width: 861px) {
  .item-layout > :first-child {
    position: sticky;
    top: 24px;
  }
}

@media (max-width: 860px) {
  .item-layout,
  .form-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .topbar {
    flex-wrap: wrap;
    gap: 6px 8px;
    min-height: 0;
    padding: 10px 0 8px;
  }

  #nav {
    order: 3;
    width: calc(100% + 16px);
    margin: 0 -8px;
  }

  .chips {
    flex-wrap: nowrap;
    margin: 0 -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .chips::-webkit-scrollbar {
    display: none;
  }

  .chip {
    flex: none;
  }

  .view {
    padding-top: 24px;
  }

  .field-row,
  .steps {
    grid-template-columns: 1fr;
  }

  .facts div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .item-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 10px 12px 12px;
  }

  .listing-row {
    grid-template-columns: 60px 1fr;
  }

  .listing-row .thumb-img {
    width: 60px;
    height: 60px;
  }

  .listing-row .actions {
    grid-column: 1 / -1;
  }

  .panel {
    padding: 18px;
  }

  .tile-value {
    font-size: 1.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .item-card,
  .toast {
    transition: none;
  }
}
