:root {
  color-scheme: light;
  --ink: #15231f;
  --muted: #66736e;
  --line: #d9ded9;
  --paper: #ffffff;
  --field: #f8faf7;
  --bg: #eef1ec;
  --green: #1c6b55;
  --green-dark: #0f4639;
  --gold: #a77a25;
  --red: #9f3333;
  --blue: #245d82;
  --shadow: 0 18px 50px rgba(21, 35, 31, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(238,241,236,0.94)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23cdd5cf' stroke-width='1'%3E%3Cpath d='M0 80h160M80 0v160'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.brand,
.session {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: var(--green-dark);
  color: white;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.session {
  color: var(--muted);
  font-size: 13px;
}

.shell {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 46px 0;
}

.intro {
  max-width: 830px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  font-size: 20px;
  line-height: 1.2;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 440px);
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 22px;
}

.form-panel {
  display: grid;
  gap: 16px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--ink);
  padding: 0 12px;
}

input:focus {
  outline: 2px solid rgba(28, 107, 85, 0.2);
  border-color: var(--green);
}

button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--green-dark);
  color: white;
  cursor: pointer;
  font-weight: 760;
  text-decoration: none;
}

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

.icon-button {
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.result-panel {
  min-height: 298px;
}

.empty-state {
  display: grid;
  gap: 12px;
  place-items: center;
  min-height: 250px;
  color: var(--muted);
  text-align: center;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--blue);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 12px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.protected {
  background: rgba(159, 51, 51, 0.11);
  color: var(--red);
}

.badge.clear {
  background: rgba(28, 107, 85, 0.11);
  color: var(--green-dark);
}

#resultMessage {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.match-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.match-list div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .topbar,
  .workspace,
  .split {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    padding: 14px 18px;
  }

  .shell {
    width: min(100% - 24px, 1180px);
    padding: 28px 0;
  }
}
