:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: #183332;
  background: #f4f6f2;
  line-height: 1.55;
  --accent: #16634e;
  --line: #dce4db;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
header {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.3rem 4vw;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
header .brand {
  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}
header .brand span {
  font-weight: 400;
}
nav {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}
nav a {
  color: #38544c;
  text-decoration: none;
  font-size: 0.9rem;
}
header form {
  margin: 0;
}
main {
  max-width: 1180px;
  margin: 3.5rem auto;
  min-height: 65vh;
  padding: 0 1.5rem;
}
h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.13;
  margin: 0.4rem 0 1rem;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.1rem;
}
p {
  margin: 0.8rem 0;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: #48745c;
  font-weight: 750;
}
.lead,
.muted,
small {
  color: #617568;
}
.lead {
  margin-bottom: 2rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 1.2rem;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
  margin-bottom: 1rem;
}
.card h2:first-child {
  margin-top: 0;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
  border-top: 1px solid var(--line);
  gap: 1rem;
}
.badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  background: #eff3ec;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.success {
  background: #e1f1e6;
  color: #176044;
}
.count {
  color: #67836d;
  margin-left: 0.4rem;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 1rem;
}
button,
.button {
  font: inherit;
  background: var(--accent);
  color: white;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: 0.9rem;
}
button:hover,
.button:hover {
  filter: brightness(0.92);
}
.quiet {
  background: #eff3ec;
  color: #285447;
}
.danger {
  color: #9a3630;
  background: #fcf0ed;
}
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 1rem 0;
}
input,
select {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 400;
  background: #fff;
  border: 1px solid #bdcdc0;
  border-radius: 7px;
  padding: 0.7rem;
  margin-top: 0.35rem;
  color: #183332;
}
input:focus,
select:focus {
  outline: 2px solid #74aa91;
  outline-offset: 2px;
}
.check {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.check input {
  width: auto;
  margin: 0;
}
.actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.actions form {
  margin: 0;
}
.narrow,
.rule-form {
  max-width: 800px;
}
.narrow {
  margin-top: 2rem;
  max-width: 500px;
}
.login {
  max-width: 460px;
  margin: 5rem auto;
}
.login h1 {
  font-size: 2.5rem;
}
.login button {
  width: 100%;
  margin-top: 0.5rem;
}
.error {
  background: #fff0ed;
  border: 1px solid #e8b7ae;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  color: #8a302b;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
th,
td {
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  background: #edf2e9;
  color: #506d59;
  font-weight: 600;
}
footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #647a69;
}
details {
  margin: 1rem 0;
}
summary {
  cursor: pointer;
}
@media (max-width: 760px) {
  header {
    flex-wrap: wrap;
    gap: 1rem;
  }
  nav {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    gap: 0.6rem;
  }
  header form {
    margin-left: auto;
  }
  main {
    margin-top: 2rem;
    padding: 0 1rem;
  }
  .card {
    padding: 1.2rem;
  }
  .section-title {
    align-items: flex-start;
  }
  .login {
    margin: 2rem auto;
  }
  th,
  td {
    padding: 0.75rem;
  }
}

.notice {
  background: #e1f1e6;
  border: 1px solid #b5d5c0;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}
nav {
  flex-wrap: wrap;
}
section {
  min-width: 0;
}
input[readonly] {
  font-family: ui-monospace, monospace;
}
@media (max-width: 760px) {
  nav {
    justify-content: flex-start;
    gap: 0.75rem 1.2rem;
  }
}

.occurrence { border-top: 1px solid #dae4dd; padding: 1rem 0; }
.occurrence p { margin: .4rem 0; overflow-wrap: anywhere; }
input[type="search"], input[type="email"] { width: 100%; min-width: 0; }
.search-form { margin-bottom: 1.5rem; }
