:root {
  color-scheme: light;
  --ink: #18211f;
  --muted: #5f6f6a;
  --line: #d8e1dc;
  --paper: #f7faf7;
  --panel: #ffffff;
  --accent: #256f5a;
  --accent-strong: #174c3f;
  --warn-bg: #fff6df;
  --warn-line: #ead59a;
  --shadow: 0 18px 45px rgba(21, 39, 33, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.1rem;
}

.brand img,
.hero-panel img {
  border-radius: 8px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 36px;
  align-items: center;
  padding: 48px 0 28px;
}

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

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

h1 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 1.25rem;
  letter-spacing: 0;
}

.lede {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.15rem;
}

.hero-panel,
.form-panel,
.audit-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 24px;
}

dl {
  margin: 20px 0 0;
}

.hero-panel div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

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

dd {
  margin: 0;
  font-weight: 800;
}

.notice {
  padding: 14px 16px;
  margin-bottom: 22px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 8px;
}

.tester {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  gap: 22px;
}

.form-panel,
.audit-panel {
  padding: 22px;
}

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

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

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

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

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(37, 111, 90, 0.18);
  border-color: var(--accent);
}

.actions,
.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

.secondary,
.icon-button {
  color: var(--accent-strong);
  background: #e7f2ed;
}

.secondary:hover,
.icon-button:hover {
  background: #d6e8e0;
}

.icon-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.85rem;
}

#auditLog {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
}

#auditLog li {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

#auditLog code {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 0.78rem;
}

.categories {
  padding: 42px 0 56px;
}

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

.category-card {
  min-height: 176px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1rem;
}

.category-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.category-card .symbol {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--accent);
  font-weight: 900;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.policy {
  max-width: 820px;
  padding: 46px 0 64px;
}

.policy h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.policy section {
  margin-top: 28px;
}

@media (max-width: 860px) {
  .site-header,
  footer,
  .actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero,
  .tester {
    grid-template-columns: 1fr;
  }

  .field-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .field-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
