.upd {
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 104px 0 72px;
}

.upd--post,
.upd--compose {
  padding-top: 88px;
}

.upd__hero-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.upd__hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4.5vw, 3.15rem);
  letter-spacing: -0.045em;
  font-weight: 800;
  line-height: 1.05;
}

.upd__hero p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  max-width: 44ch;
}

.upd__hero code {
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.upd__new {
  display: inline-flex;
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  white-space: nowrap;
}

.upd__new:hover {
  filter: brightness(1.08);
}

.upd__search {
  position: relative;
  margin: 32px 0 24px;
}

.upd__search-ico {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  pointer-events: none;
}

.upd__search-ico::after {
  content: '';
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(45deg);
  border-radius: 2px;
}

.upd__search input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px 0 44px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111113;
  color: #fff;
  font: inherit;
  outline: none;
}

.upd__search input::placeholder {
  color: rgba(255, 255, 255, 0.38);
}

.upd__search input:focus {
  border-color: rgba(0, 103, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 103, 237, 0.18);
}

.upd__empty {
  margin: 28px 0 0;
  color: var(--muted);
}

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

/* Framework-style post card (Carolina palette) */
.upd-card {
  display: block;
  padding: 26px 26px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #121214;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.upd-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #161618;
  transform: translateY(-1px);
}

.upd-card__title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.upd-card__excerpt {
  margin: 10px 0 0;
  color: rgba(160, 168, 181, 0.95);
  line-height: 1.5;
  font-size: 0.98rem;
}

.upd-card__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 22px;
}

.upd-card__author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.upd-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1f2937 center / cover no-repeat;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.upd-card__who {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.upd-card__name {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upd-card__date {
  color: rgba(160, 168, 181, 0.9);
  font-size: 0.8rem;
  line-height: 1.2;
}

.upd-card__read {
  color: rgba(160, 168, 181, 0.9);
  font-size: 0.86rem;
  flex: 0 0 auto;
  white-space: nowrap;
}

.upd__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.upd__back {
  display: inline-flex;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.upd__back:hover {
  color: #fff;
}

.upd__delete {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.upd__delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

.upd__delete:disabled {
  opacity: 0.6;
  cursor: wait;
}

.upd-quote {
  margin: 18px 0;
  padding: 4px 0 4px 16px;
  border: 0;
  border-left: 3px solid var(--blue);
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.02rem;
  line-height: 1.65;
}

.upd-bullets {
  margin: 12px 0 18px;
  padding: 0 0 0 1.15rem;
  list-style: none;
}

.upd-bullets li {
  position: relative;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
  line-height: 1.55;
}

.upd-bullets li::before {
  content: '';
  position: absolute;
  left: -1.05rem;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
}

.upd-article {
  padding: 28px 28px 32px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0e0e10;
}

.upd-article__head h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.04em;
}

.upd-article__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.upd-article__body {
  margin-top: 22px;
}

.upd-article__body h2 {
  margin: 28px 0 10px;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.upd-article__body p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
  font-size: 1.02rem;
}

.upd-diff {
  margin: 16px 0 20px;
  padding: 8px 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #08080a;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
}

.upd-diff__line {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  padding: 8px 14px;
  line-height: 1.45;
}

.upd-diff__line--add {
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.upd-diff__line--remove {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.upd-diff__mark {
  font-weight: 700;
  opacity: 0.9;
}

.upd-form {
  display: grid;
  gap: 16px;
  margin-top: 8px;
}

.upd-form label {
  display: grid;
  gap: 8px;
}

.upd-form label span {
  font-size: 0.86rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

.upd-form input,
.upd-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #121214;
  color: #fff;
  font: inherit;
  outline: none;
  resize: vertical;
}

.upd-form input:focus,
.upd-form textarea:focus {
  border-color: rgba(0, 103, 237, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 103, 237, 0.18);
}

.upd-form__actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.upd-form__submit {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.upd-form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.upd-form__cancel {
  color: var(--muted);
  font-weight: 600;
}

.upd-form__status {
  margin: 0;
  font-size: 0.9rem;
}

.upd-form__status.is-error {
  color: #fca5a5;
}

@media (max-width: 720px) {
  .upd {
    width: min(100% - 28px, 720px);
    padding: 84px 0 56px;
  }

  .upd__hero-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .upd__hero h1 {
    font-size: 2.15rem;
  }

  .upd__hero p {
    font-size: 0.95rem;
  }

  .upd__search {
    margin: 22px 0 18px;
  }

  .upd__search input {
    min-height: 46px;
    border-radius: 14px;
  }

  .upd-card {
    padding: 20px 18px 18px;
    border-radius: 18px;
  }

  .upd-card__title {
    font-size: 1.18rem;
  }

  .upd-card__excerpt {
    font-size: 0.92rem;
  }

  .upd-card__meta {
    margin-top: 18px;
  }

  .upd-card__avatar {
    width: 32px;
    height: 32px;
  }

  .upd-article {
    padding: 20px 16px 24px;
  }
}
