:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #ffffff;
  --ink: #202124;
  --muted: #6b7280;
  --line: #d8d3c7;
  --accent: #11615f;
  --accent-dark: #0a4745;
  --good: #2f6b3f;
  --warn: #9a5b00;
  --shadow: 0 14px 38px rgba(32, 33, 36, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 0 14px;
}

button:hover {
  border-color: var(--accent);
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

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

.shell {
  width: min(1500px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

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

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

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
  letter-spacing: 0;
}

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

.date-field {
  display: grid;
  gap: 6px;
}

.date-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

input {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.notice {
  min-height: 24px;
  margin: 0 0 14px;
  color: var(--muted);
}

.notice.error {
  color: #a12828;
}

.notice.success {
  color: var(--good);
}

.draft-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.table-head,
.draft-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.5fr) minmax(420px, 2.2fr) minmax(128px, 0.42fr);
}

.table-head {
  border-bottom: 1px solid var(--line);
  background: #ece8df;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.table-head span,
.company-cell,
.post-cell,
.action-cell {
  padding: 16px;
}

.draft-row + .draft-row {
  border-top: 1px solid var(--line);
}

.company-cell {
  display: grid;
  align-content: start;
  gap: 10px;
}

.brand-label {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.status-pill {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 9px;
  text-transform: capitalize;
}

.status-pill.accepted {
  border-color: rgba(47, 107, 63, 0.35);
  color: var(--good);
}

.status-pill.missing {
  border-color: rgba(154, 91, 0, 0.35);
  color: var(--warn);
}

.post-cell {
  display: grid;
  gap: 10px;
}

h2 {
  font-size: 1rem;
  line-height: 1.3;
  letter-spacing: 0;
}

.source-link {
  min-height: 20px;
  color: var(--accent);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

.post-body {
  width: 100%;
  min-height: 310px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.action-cell {
  display: grid;
  align-content: start;
  gap: 10px;
}

.post-body:focus,
input:focus,
button:focus-visible {
  outline: 3px solid rgba(17, 97, 95, 0.2);
  outline-offset: 2px;
}

@media (max-width: 980px) {
  .table-head {
    display: none;
  }

  .draft-row {
    grid-template-columns: 1fr;
  }

  .draft-row + .draft-row {
    border-top: 8px solid var(--bg);
  }

  .action-cell {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 20px, 1500px);
    padding-top: 18px;
  }

  .topbar,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  button,
  input {
    width: 100%;
  }

  .action-cell {
    grid-template-columns: 1fr;
  }
}
