/* Palette and button style sampled from sample-design.png */
:root {
  --bg: #fcfaf2;
  --ink: #191916;
  --body: #3d3c38;
  --muted: #74716a;
  --line: #d8d2cb;
  --red: #ef442e;
  --red-dark: #d93a25;
  --field: #fffdf8;
  --radius: 8px;
  --font: 'Epilogue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 18px/1.6 var(--font);
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Header bar with hairline, like the reference */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand::after { content: '*'; color: var(--red); font-weight: 800; margin-left: 2px; position: relative; top: -0.35em; }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(48px, 10vh, 112px) 24px 80px;
}
.page.wide { max-width: 1040px; padding-top: 56px; }

h1 {
  font-weight: 800;
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 24px;
  text-wrap: balance;
}
.wide h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 56px 0 16px;
}
p { margin: 0 0 14px; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--red); }
.muted { color: var(--muted); }

/* Buttons: ink border, heavier bottom edge, uppercase tracked label */
button {
  font: 500 0.92rem/1 var(--font);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 17px 34px 15px;
  margin-top: 18px;
  color: #fff;
  background: var(--red);
  border: 2px solid var(--ink);
  border-bottom-width: 3px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .08s ease, background-color .15s ease;
}
button:hover { background: var(--red-dark); }
button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--red) 45%, transparent);
  outline-offset: 2px;
}
button:disabled { opacity: .55; cursor: default; transform: none; }
button.secondary { color: var(--ink); background: transparent; }
button.secondary:hover { background: var(--field); }
button.small { padding: 10px 16px 8px; font-size: .78rem; margin: 0; }

/* Claim / done result list (red check marks, like the reference) */
.checks { list-style: none; padding: 0; margin: 0 0 14px; }
.checks li { position: relative; padding-left: 30px; margin: 6px 0; color: var(--ink); }
.checks li::before { content: '✓'; position: absolute; left: 0; color: var(--red); font-weight: 700; }

/* Forms */
form.grid { display: grid; gap: 16px; }
label { display: grid; gap: 6px; font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
input, select, textarea {
  font: 400 1rem/1.4 var(--font);
  letter-spacing: normal;
  text-transform: none;
  color: var(--ink);
  background: var(--field);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 11px 12px;
}
input, select { height: 50px; }
textarea { min-height: 84px; resize: vertical; }
.row { display: flex; gap: 16px; align-items: end; flex-wrap: wrap; }
.row > * { flex: 1 1 220px; }
.row > button { flex: 0 0 auto; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--ink); }
td { color: var(--ink); }

.pill { display: inline-block; padding: 3px 10px 2px; border-radius: 99px; font-size: .72rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; border: 1.5px solid var(--ink); white-space: nowrap; }
.pill.open { background: var(--red); border-color: var(--ink); color: #fff; }
.pill.claimed { color: var(--ink); }
.pill.done { color: var(--muted); border-color: var(--line); }

.warn { padding: 12px 16px; border: 2px solid var(--ink); border-left: 8px solid var(--red); border-radius: var(--radius); margin: 0 0 12px; color: var(--ink); background: var(--field); }
.msg { margin-top: 14px; color: var(--ink); }
.msg:empty { display: none; }

@media (max-width: 560px) {
  body { font-size: 17px; }
  button:not(.small) { width: 100%; }
}

/* Sites & reviewers */
h3 { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; color: var(--ink); margin: 0; }
.site-card { border: 2px solid var(--ink); border-bottom-width: 3px; border-radius: var(--radius); background: var(--field); padding: 22px 24px 18px; margin: 0 0 20px; }
.site-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 14px; }
.site-head .meta { margin: 2px 0 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 0 0 18px; font-size: .92rem; }
.facts dt { color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.facts dd { margin: 0; color: var(--ink); word-break: break-word; }
.site-card table { font-size: .92rem; }
.site-card th { border-bottom-width: 1.5px; }
tr.inactive td { color: var(--muted); }
.status-text { color: var(--muted); font-size: .85rem; }
.pill.ready { color: var(--ink); border-color: var(--ink); background: transparent; }
.pill.ready::before { content: '✓ '; color: var(--red); }
.row-actions { white-space: nowrap; text-align: right; }
button.link { all: unset; cursor: pointer; font: 500 .85rem/1 var(--font); color: var(--ink); text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 2px; text-underline-offset: 3px; margin-left: 14px; }
button.link:hover { color: var(--red); }
button.link:focus-visible { outline: 3px solid color-mix(in srgb, var(--red) 45%, transparent); outline-offset: 2px; }
.add-reviewer { margin-top: 16px; }
.add-reviewer label { font-size: .72rem; }
.add-reviewer input { height: 42px; padding: 8px 10px; }
.add-reviewer button { height: 42px; }
.form-error { color: var(--red-dark); font-weight: 500; margin: 6px 0 0; font-size: .92rem; }
.form-error:empty { display: none; }
.hint { color: var(--muted); font-size: .85rem; margin: 0; }

dialog { width: min(640px, calc(100vw - 32px)); padding: 28px; border: 2px solid var(--ink); border-bottom-width: 3px; border-radius: var(--radius); background: var(--bg); color: var(--body); }
dialog::backdrop { background: rgb(25 25 22 / .45); }
dialog h3 { font-size: 1.5rem; margin-bottom: 4px; }
dialog .actions { display: flex; gap: 12px; flex-wrap: wrap; }
dialog .actions button { margin-top: 4px; }
label.check { display: flex; gap: 10px; align-items: center; text-transform: none; letter-spacing: normal; font-size: .95rem; font-weight: 500; }
label.check input { width: 20px; height: 20px; accent-color: var(--red); }

@media (max-width: 560px) {
  .site-card { padding: 18px 16px; }
  .facts { grid-template-columns: 1fr; }
  .site-head { flex-direction: column; }
}

/* Follow-up section on the claim page ("Finished your review?") */
.followup { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.followup h2 { margin: 0 0 10px; }
.followup button { margin-top: 6px; }
