:root {
  --font-size-base: 14px;
  --size-card: 460px;
  --size-card-wide: 640px;
}

html,
body {
  height: 100%;
  min-height: 100%;
  padding: 0;
  margin: 0;
  font-size: var(--font-size-base);
  font-family: var(--font-family-body);
  font-weight: var(--font-weight-regular);
  color: var(--body-text);
  background: var(--neutrals-bg-default);
}

main {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-24) var(--space-16);
}

a {
  color: var(--primary-default);
  text-decoration: none;
}

b,
strong {
  color: var(--primary-default);
}

h2 {
  margin: 0;
  font-family: var(--font-family-heading);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-medium);
  color: var(--body-text);
}

h3 {
  margin: var(--space-8) 0 0;
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: var(--body-text);
}

p {
  margin: 0;
}

.center {
  display: block;
  text-align: center;
}

.muted {
  color: var(--neutrals-core-default);
}

.lede {
  margin: 0;
  text-align: center;
  color: var(--neutrals-core-default);
  font-size: var(--font-size-sm);
}

.divider {
  width: var(--size-48);
  margin: var(--space-8) auto;
  border: none;
  border-top: var(--border-width-sm) solid var(--neutrals-border-medium);
}

.organisation-name {
  margin: 0;
  color: var(--body-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.card {
  background: var(--white);
  border: var(--border-width-sm) solid var(--neutrals-border-medium);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--elevation-small);
  padding: var(--space-40) var(--space-32) var(--space-32);
  width: min(420px, 92vw);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  margin: 0;
  box-sizing: border-box;
}

.card.wide {
  width: min(var(--size-card), 92vw);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-header .logo {
  width: var(--size-48);
  height: var(--size-48);
  border-radius: var(--border-radius-md);
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

label {
  display: block;
}

input[type='text'],
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: var(--space-12) var(--space-16);
  border-radius: var(--border-radius-sm);
  border: var(--border-width-sm) solid var(--neutrals-border-medium);
  font: inherit;
  font-size: var(--font-size-md);
  background: var(--white);
  color: var(--body-text);
}

textarea {
  min-height: var(--size-64);
  resize: vertical;
}

input[type='text']:focus,
textarea:focus {
  outline-color: var(--primary-default);
  outline-style: solid;
  outline-width: var(--border-width-md);
  outline-offset: var(--border-width-md);
}

button {
  background: var(--primary-default);
  color: var(--primary-inverse);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  border: none;
  border-radius: var(--border-radius-md);
  padding: var(--space-16);
  font-size: var(--font-size-md);
  font-family: inherit;
  width: 100%;
}

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

button.secondary {
  width: auto;
  align-self: center;
  background: transparent;
  color: var(--primary-default);
  font-weight: var(--font-weight-regular);
  padding: var(--space-8) var(--space-12);
}

button.secondary:hover {
  background: var(--primary-light);
}

form {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  margin: 0;
}

.info-box {
  padding: var(--space-16);
  background: var(--primary-light);
  border-radius: var(--border-radius-sm);
  border: var(--border-width-sm) solid var(--green-200);
}

.error {
  padding: var(--space-16);
  background: var(--red-100);
  border-radius: var(--border-radius-sm);
  border: var(--border-width-sm) solid var(--red-200);
  color: var(--red-800);
}

.properties-section,
.properties-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.property-item {
  border: var(--border-width-sm) solid var(--grey-200);
  border-radius: var(--border-radius-md);
  background: var(--white);
  overflow: hidden;
}

.property-item > .organisation-name {
  padding: var(--space-12) var(--space-16) 0;
}

button.org-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: var(--space-16);
  background: var(--white);
  color: var(--body-text);
  border: none;
  border-top: var(--border-width-sm) solid var(--neutrals-border-weak);
  border-radius: 0;
  font-weight: var(--font-weight-regular);
  font-size: var(--font-size-md);
  text-align: left;
  cursor: pointer;
}

button.org-choice:first-child {
  border-top: none;
}

button.org-choice:hover {
  background: var(--neutrals-bg-default);
}

button.org-choice:focus-visible {
  outline: 2px solid var(--primary-default);
  outline-offset: -2px;
}

.org-choice-chevron {
  width: var(--size-16);
  height: var(--size-16);
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--neutrals-core-default);
}

.property-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-12);
}

.property-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.property-name {
  font-weight: var(--font-weight-bold);
  color: var(--body-text);
}

.sites-dropdown {
  border-top: var(--border-width-sm) solid var(--grey-200);
}

.sites-list {
  display: flex;
  flex-direction: column;
}

.site-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  padding: var(--space-12) var(--space-16);
  border-top: var(--border-width-sm) solid var(--neutrals-border-weak);
  cursor: pointer;
}

.sites-list .site-item:first-child {
  border-top: none;
}

.site-name {
  font-weight: var(--font-weight-medium);
}

.sites-empty {
  padding: var(--space-16);
  text-align: center;
  color: var(--neutrals-core-default);
}

code {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
}

pre {
  font-family: var(--font-family-mono);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-lg);
  white-space: pre;
  overflow: auto;
  background: var(--grey-100);
  border: var(--border-width-sm) solid var(--grey-200);
  border-radius: var(--border-radius-md);
  padding: var(--space-12);
  margin: 0;
}
