* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f7f7f4;
  color: #20201d;
  font-family: system-ui, sans-serif;
}

a {
  color: #0f5f5a;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
.button {
  border: 1px solid #b9b7ad;
  border-radius: 6px;
  background: #ffffff;
  color: #20201d;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  min-height: 40px;
  padding: 0 14px;
}

.primary {
  border-color: #0f5f5a;
  background: #0f5f5a;
  color: #ffffff;
}

.site-header {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #dedbd1;
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
}

.brand {
  align-items: center;
  color: #20201d;
  display: inline-flex;
  gap: 8px;
  font-weight: 700;
}

.brand img {
  height: 28px;
  width: 28px;
}

nav,
nav form,
.actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

main {
  margin: 0 auto;
  max-width: 880px;
  padding: 44px 24px;
}

.home {
  padding-top: 88px;
}

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

h1 {
  font-size: 40px;
  line-height: 1.15;
}

h2 {
  border-bottom: 1px solid #dedbd1;
  font-size: 22px;
  margin-top: 40px;
  padding-bottom: 10px;
}

.panel {
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 20px;
}

.inline-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.url-source-form {
  gap: 12px;
}

.url-service-row {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr minmax(96px, auto) auto;
}

.service-badge {
  color: #0f5f5a;
  font-weight: 700;
  min-height: 44px;
  padding-top: 12px;
}

.source-url-result {
  color: #20201d;
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.source-url-result p {
  margin: 0;
}

.source-preview {
  align-items: stretch;
  background: #fbfaf7;
  border: 1px solid #dedbd1;
  border-radius: 8px;
  display: grid;
  gap: 0;
  grid-template-columns: 164px 1fr;
  overflow: hidden;
}

.source-preview-image-wrap {
  align-items: center;
  background: #ece8df;
  display: flex;
  justify-content: center;
  min-height: 164px;
  padding: 16px;
}

.source-url-image {
  display: block;
  max-height: 132px;
  max-width: 132px;
  object-fit: cover;
  width: 100%;
}

.source-preview-body {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 18px;
}

.source-preview-service {
  color: #0f5f5a;
  font-size: 13px;
  font-weight: 700;
}

.source-preview-title {
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}

.source-preview-description {
  color: #4d4a43;
  line-height: 1.6;
}

.source-url-register-form {
  margin-top: 12px;
}

.form-page {
  max-width: 560px;
}

label {
  display: grid;
  font-weight: 700;
  gap: 6px;
}

input {
  border: 1px solid #b9b7ad;
  border-radius: 6px;
  font: inherit;
  min-height: 44px;
  padding: 0 12px;
}

.error {
  background: #fff4f1;
  border: 1px solid #d18b7a;
  border-radius: 6px;
  color: #8b2f1c;
  padding: 12px;
}

.profile-head {
  margin-bottom: 32px;
}

.public-url,
.empty {
  color: #666257;
}

.podcast-list {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.podcast-list li {
  background: #fbfaf7;
}

.podcast-list h3 {
  margin: 0;
}

.podcast-list-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.podcast-list-actions form {
  margin: 0;
}

.icon-button {
  min-height: 32px;
  padding: 0;
  width: 32px;
}

.icon-button svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}

.icon-button.danger {
  color: #8b2f1c;
}

.icon-button.danger:hover {
  background: #fff4f1;
  border-color: #d18b7a;
}

.source-type-label {
  color: #666257;
  margin-left: 12px;
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.search-results h3 {
  font-size: 18px;
  margin-bottom: 0;
}

.feed-result {
  background: #ffffff;
  border: 1px solid #dedbd1;
  border-radius: 8px;
  overflow: hidden;
}

.feed-result summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 16px;
}

pre {
  background: #20201d;
  color: #f7f7f4;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
  overflow-x: auto;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 640px) {
  .site-header,
  .podcast-list li {
    align-items: flex-start;
    flex-direction: column;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .url-service-row {
    grid-template-columns: 1fr;
  }

  .service-badge {
    min-height: 0;
    padding-top: 0;
  }

  .source-preview {
    grid-template-columns: 1fr;
  }

  .source-preview-image-wrap {
    aspect-ratio: 1;
    min-height: 0;
  }

  nav {
    flex-wrap: wrap;
  }

  h1 {
    font-size: 32px;
  }
}
