:root {
  color-scheme: light;
  color: #111;
  background: #f8f9fb;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.6;
  background: #f8f9fb;
}
img {
  max-width: 100%;
}
.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}
.page-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #ececec;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
}
.brand {
  text-decoration: none;
  color: #111;
  font-weight: 700;
  font-size: 1.2rem;
}
.site-nav a {
  color: #555;
  text-decoration: none;
  margin-left: 1.25rem;
  transition: color .2s ease;
}
.site-nav a:hover {
  color: #0a66c2;
}
.hero {
  padding: 4rem 0 3rem;
  background: linear-gradient(180deg, #ffffff 0%, #eef4ff 100%);
}
.hero-copy {
  max-width: 760px;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #0a66c2;
  font-size: .85rem;
}
.hero h1 {
  margin: 0;
  font-size: clamp(2.25rem, 3.5vw, 4rem);
  line-height: 1.05;
}
.hero-description {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: #444;
  max-width: 760px;
}
.posts-section {
  padding: 2rem 0 4rem;
}
.section-heading {
  margin-bottom: 1.5rem;
}
.section-heading h2 {
  margin: 0 0 .5rem;
  font-size: 1.8rem;
}
.section-heading p {
  margin: 0;
  color: #555;
}
.post-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.post-card {
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-rows: auto 1fr;
}
.post-card-image-wrap {
  width: 100%;
  min-height: 180px;
  overflow: hidden;
}
.post-card-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.post-card-content {
  padding: 1.5rem;
}
.post-card h3 {
  margin: 0 0 .75rem;
  font-size: 1.2rem;
}
.post-card h3 a {
  color: #0a66c2;
  text-decoration: none;
}
.post-card h3 a:hover {
  text-decoration: underline;
}
.summary {
  color: #556;
  margin: 0 0 1rem;
}
.post-meta {
  color: #777;
  font-size: .95rem;
}
.post-detail {
  background: #ffffff;
  border-radius: 24px;
  padding: 2rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
}
.post-hero-image {
  overflow: hidden;
  border-radius: 24px;
  margin-bottom: 1.5rem;
}
.post-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.post-detail h1 {
  margin-top: 0;
  font-size: clamp(2.2rem, 3vw, 3.2rem);
}
.post-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-bottom: 1rem;
  font-size: .95rem;
  color: #666;
}
.post-badge {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: #eef4ff;
  color: #0a66c2;
  font-weight: 700;
}
.post-summary {
  margin: 1rem 0 2rem;
  color: #444;
  font-size: 1.05rem;
}
.post-body {
  line-height: 1.9;
  color: #222;
}
.post-body p {
  margin: 1.25rem 0;
}
.share-box {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: 16px;
  background: #f5f8ff;
}
.share-box p {
  margin: 0;
  font-weight: 600;
}
.share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.1rem;
  border-radius: 999px;
  background: #0a66c2;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.share-link:hover {
  background: #084b98;
}
.back-link {
  display: inline-block;
  margin-top: 2rem;
  text-decoration: none;
  color: #0a66c2;
}
.site-footer {
  margin-top: auto;
  padding: 2rem 0;
  background: #ffffff;
  border-top: 1px solid #ececec;
}
.site-footer p {
  margin: 0;
  color: #555;
}
@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav a {
    margin-left: 0;
    margin-right: 1rem;
  }
  .post-card {
    padding: 1.25rem;
  }
}

.auth-card,
.admin-form-card,
.admin-dashboard,
.content-block {
  background: #ffffff;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.06);
  margin-bottom: 2rem;
}

.auth-card h1,
.admin-header h1,
.section-heading h2 {
  margin-bottom: 1rem;
}

.auth-form label,
.editor-form label {
  display: block;
  margin-bottom: 1rem;
  color: #333;
}

.auth-form input,
.editor-form input,
.editor-form textarea {
  width: 100%;
  border: 1px solid #dce2ea;
  border-radius: 12px;
  padding: 0.95rem 1rem;
  font-size: 1rem;
}

.image-preview {
  margin-bottom: 1rem;
}

.image-preview img {
  width: 100%;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.feature-list {
  display: grid;
  gap: 0.85rem;
  padding-left: 1.2rem;
  color: #444;
}

.feature-list li {
  position: relative;
  padding-left: 1.3rem;
}

.feature-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #0a66c2;
  font-weight: 700;
}

.form-actions {
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.button-primary {
  background: #0a66c2;
  color: white;
}

.button-secondary {
  background: #eef4ff;
  color: #0a66c2;
}

.button:hover {
  opacity: 0.92;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.admin-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.posts-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 1rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid #f0f3f7;
}

.admin-table th {
  color: #556;
  font-size: 0.95rem;
}

.admin-table td {
  color: #222;
}

.inline-form {
  display: inline;
}

.text-button {
  background: transparent;
  border: none;
  color: #0a66c2;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.flash-list {
  margin-bottom: 1rem;
}

.flash {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  margin-bottom: 0.75rem;
}

.flash.success {
  background: #e8f7ed;
  color: #0f6c3f;
}

.flash.error {
  background: #fff1f3;
  color: #b22630;
}
