:root {
  --ink: #252622;
  --muted: #6d7069;
  --paper: #f6f4ee;
  --surface: #fffefa;
  --line: #d8d3c8;
  --accent: #b54e31;
  --green: #516e5a;
  --warning: #8b641f;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 12%, rgba(181, 78, 49, .09), transparent 28rem),
    var(--paper);
  font-family: "Avenir Next", Avenir, "Segoe UI", sans-serif;
}

.resource-shell {
  width: min(620px, 100%);
  padding: clamp(28px, 7vw, 48px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(55, 50, 40, .08);
}

.resource-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(31px, 8vw, 48px);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.resource-status {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.6;
}

.resource-status::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: .45em;
  border: 2px solid rgba(81, 110, 90, .3);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: resource-spin .8s linear infinite;
}

body[data-resource-state="locked"] .resource-status::before,
body[data-resource-state="error"] .resource-status::before {
  border: 0;
  border-radius: 50%;
  background: var(--warning);
  animation: none;
}

.resource-back {
  display: inline-flex;
  margin-top: 24px;
  color: #24445c;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.resource-back:hover { text-decoration: underline; }
.resource-back:focus-visible { outline: 3px solid var(--ink); outline-offset: 4px; }

@keyframes resource-spin { to { transform: rotate(360deg); } }

@media (max-width: 480px) {
  body { padding: 14px; }
  .resource-shell { padding: 28px 22px; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .resource-status::before { animation: none; }
}
