:root {
  --li-bg: #f3f2ef;
  --li-card: #fff;
  --li-text: rgba(0, 0, 0, 0.9);
  --li-muted: rgba(0, 0, 0, 0.6);
  --li-soft: rgba(0, 0, 0, 0.45);
  --li-border: rgba(0, 0, 0, 0.08);
  --li-link: #0a66c2;
  --li-green: #057642;
  --li-amber: #b54708;
  --pm-accent: #ef413d;
  --font-heading: "DM Serif Display", Georgia, serif;
  --font-body: Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--li-text);
  background: var(--li-bg);
}

a {
  color: var(--li-link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--li-border);
  backdrop-filter: blur(10px);
}

.top-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--li-text);
  text-decoration: none;
}

.top-nav .brand:hover {
  text-decoration: none;
  color: var(--pm-accent);
}

.top-nav .brand img {
  height: 26px;
  width: auto;
  display: block;
}

.top-nav .nav-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.top-nav label {
  font-size: 12px;
  color: var(--li-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.top-nav input[type="password"],
.top-nav input[type="text"] {
  padding: 6px 10px;
  border: 1px solid var(--li-border);
  border-radius: 4px;
  font: inherit;
  min-width: 160px;
}

.top-nav button {
  font: inherit;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--li-card);
  font-weight: 600;
  font-size: 13px;
}

.top-nav button.primary {
  background: var(--li-link);
  color: #fff;
  border-color: var(--li-link);
}

.top-nav button.primary:hover {
  background: #004182;
  border-color: #004182;
}

.save-pill {
  font-size: 12px;
  color: var(--li-muted);
  padding: 4px 0;
}

.save-pill.saving {
  color: var(--li-link);
}

.save-pill.error {
  color: var(--pm-accent);
}

.layout {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 80px;
}

.internal-banner {
  font-size: 12px;
  color: var(--li-muted);
  background: rgba(239, 65, 61, 0.08);
  border: 1px solid rgba(239, 65, 61, 0.25);
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.profile-card {
  background: var(--li-card);
  border-radius: 8px;
  border: 1px solid var(--li-border);
  padding: 20px;
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
}

.profile-card .avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.profile-card h1 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.profile-card .headline {
  font-size: 14px;
  color: var(--li-muted);
  margin: 0 0 8px;
}

.profile-card .meta {
  font-size: 13px;
  color: var(--li-soft);
}

.feed-intro {
  font-size: 13px;
  color: var(--li-muted);
  margin-bottom: 16px;
}

.post-card {
  background: var(--li-card);
  border-radius: 8px;
  border: 1px solid var(--li-border);
  margin-bottom: 16px;
  overflow: hidden;
}

.post-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 0;
}

.post-card__head .mini-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a66c2 0%, #004182 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.post-card__head .who {
  flex: 1;
  min-width: 0;
}

.post-card__head .name-line {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
}

.post-card__head .sub-line {
  font-size: 12px;
  color: var(--li-muted);
  margin-top: 2px;
}

.post-card__body {
  padding: 8px 16px 16px;
}

.post-card__body p {
  margin: 0 0 12px;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.75);
}

.post-card__body p.post-card__open {
  margin: 0 0 10px;
  line-height: 1.48;
  font-weight: 600;
  color: var(--li-text);
}

.post-card__body p:last-child {
  margin-bottom: 0;
}

.post-card__tags {
  margin-top: 12px;
  font-size: 13px;
  color: var(--li-muted);
  line-height: 1.45;
}

.post-card__footnote {
  margin-top: 12px;
  font-size: 12px;
  color: var(--li-soft);
  line-height: 1.45;
}

.post-card__footnote a {
  font-weight: 500;
}

.review-strip {
  background: #fafafa;
  border-top: 1px solid var(--li-border);
  padding: 14px 16px 18px;
}

.review-strip h3 {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--li-muted);
}

.review-strip fieldset.status-fieldset {
  border: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.review-strip .status-fieldset label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--li-text);
}

.review-strip .status-fieldset input {
  accent-color: var(--li-link);
}

.review-strip textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  font: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid var(--li-border);
  border-radius: 6px;
  margin-top: 4px;
}

.review-strip textarea:disabled {
  background: #eee;
  color: var(--li-muted);
}

.review-strip textarea::placeholder {
  color: rgba(0, 0, 0, 0.35);
}

.fallback-toolbar {
  margin-top: 32px;
  padding: 16px;
  border: 1px dashed var(--li-border);
  border-radius: 8px;
  background: var(--li-card);
}

.fallback-toolbar h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.fallback-toolbar p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--li-muted);
}

.fallback-toolbar .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fallback-toolbar button,
.fallback-toolbar label.file-btn {
  font: inherit;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: var(--li-bg);
  font-weight: 600;
  font-size: 13px;
}

.fallback-toolbar input[type="file"] {
  display: none;
}

.page-footer {
  text-align: center;
  font-size: 12px;
  color: var(--li-muted);
  padding: 32px 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .top-nav .nav-actions {
    width: 100%;
    margin-left: 0;
  }
}
