:root {
  --bg: #f6f3ec;
  --surface: #fffdf8;
  --ink: #14231d;
  --muted: #66736c;
  --line: #d9ded8;
  --accent: #246b57;
  --warn: #b35d24;
  --soft: #edf5f1;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, sans-serif;
}

a {
  color: var(--accent);
}

.layout {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 18px 0 42px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a,
.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

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

.hero {
  padding: 42px 0 26px;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 1;
}

h2,
h3 {
  margin-top: 0;
}

.lead {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

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

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

.card,
.panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel {
  margin-bottom: 14px;
}

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

.status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 700;
}

.notice {
  padding: 12px 14px;
  margin-bottom: 14px;
  border-left: 4px solid var(--accent);
  background: var(--soft);
}

.notice.warn {
  border-color: var(--warn);
}

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 110px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.messages {
  display: grid;
  gap: 10px;
}

.message {
  padding: 12px;
  border-radius: 8px;
  background: #f4f7f5;
}

.message.mine {
  background: #e6f3ee;
}

.event-list {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.event-list li {
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #fff;
}

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

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