:root {
  color-scheme: light;
  --ink: #20242b;
  --muted: #5d6674;
  --line: #dce2e9;
  --surface: #f7f8fa;
  --primary: #1663c7;
  --primary-hover: #0f4f9f;
  --danger: #8a2d2a;
  --disabled: #aeb6c2;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  margin: 0;
  background: #fff;
}

body {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

.panel {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 36px 24px 48px;
}

.intro {
  margin-bottom: 28px;
}

h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.intro p {
  max-width: 760px;
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.55;
}

.intro .requirement {
  margin-top: 14px;
}

a {
  color: var(--primary);
  font-weight: 700;
}

.search-form label {
  display: block;
  margin-bottom: 9px;
  font-weight: 700;
}

.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  height: 48px;
  border: 1px solid #aeb5bf;
  border-radius: 4px;
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
}

input:focus-visible {
  border-color: var(--primary);
  outline: 2px solid rgba(22, 99, 199, 0.22);
  outline-offset: 1px;
}

button {
  min-width: 126px;
  height: 48px;
  border: 0;
  border-radius: 4px;
  padding: 0 22px;
  color: #fff;
  background: var(--primary);
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  background: var(--primary-hover);
}

button:focus-visible {
  outline: 3px solid rgba(22, 99, 199, 0.26);
  outline-offset: 2px;
}

button:disabled {
  color: #fff;
  background: var(--disabled);
  cursor: not-allowed;
}

.status {
  display: none;
  margin: 22px 0 0;
  border-left: 3px solid #75808e;
  padding: 14px 16px;
  color: var(--muted);
  background: var(--surface);
  line-height: 1.45;
}

.status.visible {
  display: block;
}

.status.error {
  border-color: var(--danger);
  color: #76211e;
  background: #fff1f0;
}

.results {
  margin-top: 26px;
  border-top: 1px solid var(--line);
}

.result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 150px;
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
}

.result.unavailable {
  background: var(--surface);
}

.result-copy {
  min-width: 0;
}

.company-name {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.unavailable .company-name {
  color: #737373;
  text-decoration: line-through;
}

.business-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.entity-type {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #c5d5ea;
  border-radius: 3px;
  padding: 3px 9px;
  color: #264b76;
  background: #edf4fc;
  font-size: 14px;
  font-weight: 700;
}

.entity-status {
  color: var(--muted);
  font-size: 14px;
}

.nzbn {
  margin: 0;
  color: #424b58;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.company-number {
  color: var(--muted);
  font-weight: 400;
}

.form-panel {
  width: 100%;
  background: #fff;
}

.form-toolbar {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 16px;
}

.back-button {
  width: auto;
  min-width: 0;
  border: 1px solid var(--primary);
  padding: 0 18px;
  color: var(--primary);
  background: #fff;
}

.back-button:hover,
.back-button:focus-visible {
  color: #fff;
  background: var(--primary);
}

#zoho-wrapper {
  display: block;
  width: 100%;
  height: 1200px;
  min-height: 500px;
  border: 0;
  overflow: hidden;
}

@media (max-width: 640px) {
  .panel {
    padding: 26px 16px 36px;
  }

  h1 {
    font-size: 26px;
  }

  .search-controls,
  .result {
    grid-template-columns: 1fr;
  }

  .result {
    align-items: stretch;
    gap: 18px;
  }

  .search-controls button,
  .result button {
    width: 100%;
  }

  .form-toolbar {
    width: calc(100% - 24px);
    padding-top: 14px;
  }
}
