:root {
  color-scheme: light;
  --ink: #16211f;
  --muted: #66716e;
  --line: #d8e1de;
  --panel: #ffffff;
  --page: #f4f8f6;
  --brand: #177e72;
  --accent: #f2b84b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0 24px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
}

h2 {
  margin: 8px 0;
  font-size: 20px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stats form,
.header-actions form {
  margin: 0;
}

.stats span,
.type {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.type {
  border-color: #b7d7d0;
  background: #e7f5f1;
  color: #0f6b61;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 4px 10px;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}

.logout-button:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.login-shell {
  width: min(420px, calc(100% - 32px));
}

.login-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 28px;
  box-shadow: 0 16px 50px rgb(22 33 31 / 8%);
}

.login-card h1 {
  font-size: clamp(32px, 8vw, 46px);
}

.login-help {
  margin: 14px 0 24px;
  color: var(--muted);
  line-height: 1.5;
}

.login-form {
  display: grid;
  gap: 10px;
}

.login-form label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-form input,
.login-form button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.login-form input:focus {
  border-color: var(--brand);
  outline: 3px solid rgb(23 126 114 / 14%);
}

.login-form button {
  margin-top: 4px;
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.form-error {
  margin: 0;
  color: #b42318;
  font-size: 14px;
  font-weight: 700;
}

.composer {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  margin-bottom: 22px;
}

.composer form {
  display: grid;
  grid-template-columns: 110px 1fr 1.4fr auto;
  gap: 10px;
  align-items: start;
}

.composer textarea,
.composer input,
.composer button {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.composer textarea {
  grid-column: 2 / 4;
  min-height: 74px;
  resize: vertical;
}

.composer input[type="file"] {
  grid-column: 1 / 4;
  background: #fff;
}

.composer button {
  grid-row: span 2;
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.list {
  display: grid;
  gap: 12px;
}

.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 16px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 14px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.item p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.url {
  overflow-wrap: anywhere;
}

.thumb {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #dce6e2;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.detail {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.hero-image {
  display: block;
  width: min(100%, 760px);
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  background: #dce6e2;
}

dl {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px 18px;
  margin-top: 24px;
}

dt {
  color: var(--muted);
  font-weight: 800;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats {
    justify-content: flex-start;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .composer form,
  .item,
  dl {
    grid-template-columns: 1fr;
  }

  .composer textarea,
  .composer input[type="file"] {
    grid-column: auto;
  }

  .composer button {
    grid-row: auto;
  }

  .thumb img {
    height: 180px;
  }
}

