:root {
  color: #161616;
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #ffffff;
}

button,
input {
  font: inherit;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e6e6e6;
  padding-bottom: 20px;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.add-button {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid #111111;
  border-radius: 50%;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.add-button:hover,
.add-button:focus-visible,
.primary-button:hover,
.primary-button:focus-visible {
  background: #111111;
  color: #ffffff;
}

.site-list {
  display: grid;
  gap: 10px;
  padding: 28px 0;
}

.site-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  border: 1px solid #e2e2e2;
  border-radius: 8px;
  padding: 14px 16px;
  color: inherit;
  text-decoration: none;
}

.site-card:hover,
.site-card:focus-visible {
  border-color: #111111;
}

.site-name {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.site-url {
  min-width: 0;
  color: #696969;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
  text-align: right;
}

.empty-state {
  margin: 0;
  color: #6d6d6d;
}

.dialog {
  width: min(420px, calc(100% - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 80px rgb(0 0 0 / 18%);
}

.dialog::backdrop {
  background: rgb(0 0 0 / 22%);
}

.dialog-panel {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 26px;
}

.dialog-panel h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.dialog-panel label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.dialog-panel input {
  width: 100%;
  border: 1px solid #cfcfcf;
  border-radius: 6px;
  padding: 12px;
  font-weight: 400;
}

.dialog-panel input:focus {
  border-color: #111111;
  outline: 2px solid #111111;
  outline-offset: 2px;
}

.primary-button {
  min-height: 44px;
  border: 1px solid #111111;
  border-radius: 6px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  font-weight: 700;
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4d4d4d;
  cursor: pointer;
}

.close-button:hover,
.close-button:focus-visible {
  background: #eeeeee;
}

.error {
  min-height: 20px;
  margin: 0;
  color: #b00020;
}

@media (max-width: 560px) {
  .topbar,
  .site-card {
    align-items: flex-start;
  }

  .site-card {
    flex-direction: column;
  }

  .site-url {
    text-align: left;
  }
}
