:root {
  color-scheme: light;
  --ink: #101917;
  --ink-soft: #31423e;
  --paper: #f3f5f2;
  --surface: #ffffff;
  --surface-muted: #e8ece6;
  --border: #cbd3cb;
  --border-strong: #9faea3;
  --teal: #0d6b5e;
  --teal-soft: #d8ebe5;
  --orange: #df5b2d;
  --orange-deep: #b94722;
  --yellow: #f1c453;
  --red: #b42318;
  --red-soft: #fee4e2;
  --shadow: 0 18px 50px rgb(16 25 23 / 9%);
  --font-body: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: Georgia, "Times New Roman", "Songti SC", serif;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% 72px,
    var(--paper);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

h1,
h2 {
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 72px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: 0;
}

.brand small {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--yellow);
  background: var(--ink);
  border-radius: var(--radius);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.text-link:hover {
  color: var(--teal);
}

.text-link svg {
  width: 17px;
  height: 17px;
}

.claim-page {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.claim-hero {
  max-width: 760px;
  padding: 84px 0 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 4px var(--teal-soft);
}

.claim-hero h1 {
  max-width: 740px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 500;
  line-height: 1.05;
}

.claim-hero p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 17px;
}

.claim-workbench {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.45fr);
  min-height: 500px;
  margin-bottom: 88px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.project-panel {
  padding: 28px;
  background: #eef1ec;
  border-right: 1px solid var(--border);
}

.panel-heading,
.section-heading,
.workspace-heading,
.modal-heading,
.rail-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading h2,
.section-heading h2,
.workspace-heading h1,
.modal-heading h2,
.rail-heading h2 {
  margin: 3px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.section-kicker {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.icon-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.icon-button:hover {
  color: var(--teal);
  background: var(--surface);
  border-color: var(--teal);
}

.icon-button:active {
  background: var(--teal-soft);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.project-list {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.project-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  width: 100%;
  min-height: 78px;
  padding: 15px 16px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}

.project-button:hover {
  background: rgb(255 255 255 / 62%);
  border-color: var(--border);
}

.project-button.active {
  background: var(--surface);
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.project-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.project-button strong,
.project-button span {
  display: block;
}

.project-button strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-button small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-count {
  align-self: center;
  min-width: 52px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 750;
  text-align: right;
}

.skeleton-row {
  height: 78px;
  background: linear-gradient(90deg, #e3e8e2, #f6f7f4, #e3e8e2) 0 0 / 200% 100%;
  border-radius: var(--radius);
  animation: skeleton-shift 1.2s linear infinite;
}

@keyframes skeleton-shift {
  to { background-position: -200% 0; }
}

.claim-panel {
  display: grid;
  min-width: 0;
  padding: 40px;
}

.claim-empty {
  display: grid;
  max-width: 360px;
  margin: auto;
  justify-items: center;
  text-align: center;
}

.claim-empty h2 {
  margin: 22px 0 8px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
}

.claim-empty p {
  color: var(--ink-soft);
}

.empty-icon,
.result-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #a9cec4;
  border-radius: 50%;
}

.empty-icon svg,
.result-icon svg {
  width: 30px;
  height: 30px;
}

.claim-detail {
  display: grid;
  align-content: start;
}

.claim-detail-heading {
  align-items: center;
}

.claim-detail-heading h2 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 500;
}

.stock-badge {
  min-width: 92px;
  padding: 8px 11px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid #a9cec4;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 750;
  text-align: center;
}

.project-description {
  max-width: 620px;
  margin: 24px 0 28px;
  color: var(--ink-soft);
  font-size: 16px;
}

.duration-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
}

.turnstile-container {
  min-height: 66px;
  margin-top: 18px;
}

.duration-chip {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 650;
}

.duration-chip strong {
  color: var(--teal);
}

.claim-rule {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 30px 0;
  padding: 16px;
  color: var(--ink-soft);
  background: #f6f7f4;
  border-left: 4px solid var(--yellow);
}

.claim-rule svg {
  flex: 0 0 20px;
  margin-top: 2px;
  color: var(--ink);
}

.claim-rule p {
  margin: 0;
  font-size: 13px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-button {
  color: #fff;
  background: var(--orange);
  border: 1px solid var(--orange);
}

.primary-button:hover {
  background: var(--orange-deep);
  border-color: var(--orange-deep);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.secondary-button:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.secondary-button.compact {
  min-height: 44px;
  padding: 0 13px;
  font-size: 13px;
}

.claim-button {
  width: 100%;
  min-height: 54px;
  margin-top: 2px;
  justify-content: space-between;
  padding: 0 20px;
}

.error-message {
  padding: 12px 14px;
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid #f5b7b2;
  border-radius: var(--radius);
  font-size: 13px;
}

.claim-detail .error-message {
  margin-bottom: 14px;
}

.claim-result {
  display: grid;
  max-width: 620px;
  margin: auto;
  justify-items: start;
}

.claim-result .result-icon {
  margin-bottom: 22px;
}

.claim-result h2 {
  margin: 7px 0 10px;
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
}

.claim-result p {
  color: var(--ink-soft);
}

.code-block {
  display: flex;
  width: 100%;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 12px 12px 18px;
  color: var(--yellow);
  background: var(--ink);
  border-radius: var(--radius);
}

.code-block code {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
}

.code-block .icon-button {
  color: var(--yellow);
  border-color: rgb(255 255 255 / 24%);
}

.code-block .icon-button:hover {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
}

.save-warning {
  margin: 14px 0 24px;
  font-size: 13px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  min-height: 72px;
  align-items: center;
  margin: 0 auto;
  color: var(--ink-soft);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 48px));
  padding: 12px 16px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Admin */

.admin-body {
  background:
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 100% 72px,
    var(--paper);
}

.admin-header {
  position: relative;
  z-index: 5;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-page {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 44px 0 80px;
}

.login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 72px;
  width: min(980px, 100%);
  margin: 70px auto;
  padding: 48px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-copy h1 {
  margin: 8px 0 18px;
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 500;
}

.login-copy p {
  max-width: 500px;
  margin-bottom: 0;
  color: var(--ink-soft);
}

.login-form {
  display: grid;
  align-content: center;
  gap: 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span {
  font-size: 13px;
  font-weight: 700;
}

.field small,
.helper-text {
  color: var(--ink-soft);
  font-size: 12px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(13 107 94 / 25%);
  outline-offset: 2px;
  border-color: var(--teal);
}

.admin-dashboard {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 700px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-rail {
  padding: 24px;
  background: #eef1ec;
  border-right: 1px solid var(--border);
}

.rail-heading h2 {
  font-size: 21px;
}

.admin-project-list {
  display: grid;
  gap: 7px;
  margin-top: 24px;
}

.admin-project-button {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
}

.admin-project-button:hover {
  background: rgb(255 255 255 / 64%);
}

.admin-project-button.active {
  background: var(--surface);
  border-color: var(--teal);
}

.admin-project-button strong {
  display: block;
  max-width: 140px;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-project-button small {
  display: block;
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 11px;
}

.rail-empty {
  padding: 16px 4px;
  color: var(--ink-soft);
  font-size: 13px;
}

.admin-content {
  min-width: 0;
  padding: 28px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 30px;
}

.metric {
  display: flex;
  min-height: 104px;
  align-items: center;
  gap: 15px;
  padding: 18px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: var(--teal);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.metric span {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
}

.project-workspace {
  min-width: 0;
}

.workspace-heading {
  align-items: center;
  min-height: 64px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.workspace-heading h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
}

.workspace-heading p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.empty-workspace {
  display: grid;
  min-height: 440px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.empty-workspace h2 {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 500;
}

.empty-workspace p {
  color: var(--ink-soft);
}

.workspace-stack {
  display: grid;
  gap: 30px;
}

.tool-section {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.tool-section:last-child {
  border-bottom: 0;
}

.section-heading {
  align-items: center;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-size: 22px;
}

.upload-form {
  display: grid;
  gap: 16px;
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: 14px;
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.upload-preview {
  padding: 14px;
  color: var(--ink-soft);
  background: #f6f7f4;
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  font-size: 13px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.preview-stat {
  padding: 10px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.preview-stat strong {
  display: block;
  font-size: 20px;
}

.preview-stat span {
  font-size: 11px;
}

.preview-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}

.segmented-control {
  display: flex;
  gap: 3px;
  padding: 3px;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.segmented-control button {
  min-height: 44px;
  padding: 0 11px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.segmented-control button.active {
  background: var(--surface);
  box-shadow: 0 1px 4px rgb(16 25 23 / 10%);
}

.table-shell {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 670px;
  border-collapse: collapse;
  font-size: 13px;
}

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

th {
  color: var(--ink-soft);
  background: #f6f7f4;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

tbody tr:hover {
  background: #fafbf9;
}

.align-right {
  text-align: right;
}

.mono {
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
}

.status-label {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 8px;
  color: var(--teal);
  background: var(--teal-soft);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}

.status-label.claimed {
  color: var(--ink-soft);
  background: var(--surface-muted);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.table-action {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.table-action:hover {
  color: var(--teal);
  border-color: var(--teal);
}

.table-action.danger:hover {
  color: var(--red);
  border-color: var(--red);
}

.table-action svg {
  width: 16px;
  height: 16px;
}

.table-footer {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 12px;
}

.modal {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgb(16 25 23 / 24%);
}

.modal::backdrop {
  background: rgb(16 25 23 / 62%);
}

.modal-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.modal-heading {
  align-items: center;
}

.modal-heading h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
}

.modal-copy {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 13px;
}

.modal-code-block {
  min-height: 64px;
}

.modal-code-block code {
  font-size: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.toggle-field {
  display: grid;
  grid-template-columns: auto 36px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.toggle-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.toggle {
  position: relative;
  width: 36px;
  height: 22px;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background-color 160ms ease;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 160ms ease;
}

.toggle-field input:checked + .toggle {
  background: var(--teal);
}

.toggle-field input:checked + .toggle::after {
  transform: translateX(14px);
}

.toggle-field input:focus-visible + .toggle {
  outline: 3px solid rgb(13 107 94 / 25%);
  outline-offset: 2px;
}

.toggle-field strong,
.toggle-field small {
  display: block;
}

.toggle-field strong {
  font-size: 13px;
}

.toggle-field small {
  margin-top: 3px;
  color: var(--ink-soft);
  font-size: 12px;
}

@media (max-width: 960px) {
  .claim-workbench {
    grid-template-columns: 1fr;
  }

  .project-panel {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .project-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .login-panel {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .admin-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-rail {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .admin-project-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .site-header,
  .claim-page,
  .site-footer,
  .admin-page {
    width: min(100% - 28px, 1180px);
  }

  .claim-hero {
    padding: 56px 0 32px;
  }

  .claim-hero h1 {
    font-size: 40px;
  }

  .claim-hero p {
    font-size: 15px;
  }

  .claim-workbench {
    margin-bottom: 56px;
  }

  .project-panel,
  .claim-panel,
  .admin-content,
  .admin-rail,
  .login-panel {
    padding: 22px;
  }

  .project-list {
    grid-template-columns: 1fr;
  }

  .claim-detail-heading {
    align-items: flex-start;
  }

  .claim-detail-heading h2,
  .claim-result h2 {
    font-size: 32px;
  }

  .stock-badge {
    min-width: auto;
  }

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

  .metric {
    min-height: 86px;
  }

  .workspace-heading {
    align-items: flex-start;
  }

  .workspace-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .upload-grid,
  .preview-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .admin-project-list {
    grid-template-columns: 1fr 1fr;
  }

  .login-panel {
    margin: 30px auto;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100vw - 28px);
  }
}

@media (max-width: 480px) {
  .site-header {
    min-height: 66px;
  }

  .brand small {
    display: none;
  }

  .claim-hero h1 {
    font-size: 36px;
  }

  .project-panel,
  .claim-panel,
  .admin-content,
  .admin-rail,
  .login-panel {
    padding: 18px;
  }

  .panel-heading h2 {
    font-size: 22px;
  }

  .upload-grid,
  .preview-grid,
  .admin-project-list {
    grid-template-columns: 1fr;
  }

  .upload-actions {
    flex-direction: column-reverse;
  }

  .upload-actions button,
  .modal-actions button {
    width: 100%;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .site-footer {
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
