:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #252923;
  background: #fafbf8;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
.auth-card { width: min(400px, calc(100% - 40px)); margin: 80px auto; padding: 30px; background: #f7f9f3; border: 1px solid #e0e7d5; border-radius: 10px; }
.back-link { display: inline-block; margin-bottom: 30px; color: #73796d; font-size: 13px; text-decoration: none; }
.auth-card form { display: flex; flex-direction: column; margin-top: 26px; }
.auth-card label { font-size: 13px; margin-bottom: 8px; }
.auth-card input { width: 100%; margin-bottom: 20px; padding: 12px; border: 1px solid #dce2d3; border-radius: 6px; background: #fafbf8; color: inherit; font: inherit; }
.auth-card input:focus-visible { outline: 2px solid #70825c; outline-offset: 2px; }
.auth-button { border: 0; border-radius: 6px; background: #46583a; color: white; padding: 12px 22px; font: inherit; font-size: 14px; cursor: pointer; }
.auth-button:disabled { opacity: .6; cursor: wait; }
.form-error { color: #a33737; font-size: 13px; line-height: 1.6; }
.form-error:empty { display: none; }
.admin-role { color: #73796d; margin: 14px 0 26px; font-size: 14px; }
.admin-body { background: #f5f6f2; }
.admin-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100svh; }
.admin-main { grid-column: 2; grid-row: 1; }
.admin-sidebar { grid-column: 1; grid-row: 1; }
.admin-main { min-width: 0; padding: 0 clamp(24px, 5vw, 80px) 60px; }
.admin-topbar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e2e6dc; color: #899080; font-size: 12px; }
.admin-topbar > span > span { margin: 0 12px; color: #bec4b7; }
.admin-topbar strong { color: #515c47; font-weight: 500; }
.admin-topbar a { color: #626e56; text-decoration: none; }
.admin-page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px; margin: 44px 0 30px; }
.admin-page-heading h1 { font-size: 30px; letter-spacing: -1px; }
.admin-blog-actions { display: flex; flex-direction: column; gap: 10px; }
.admin-page-heading p { margin: 12px 0 0; color: #808875; font-size: 14px; line-height: 1.7; }
.admin-sidebar { display: flex; flex-direction: column; padding: 32px 22px 24px; background: #fcfdf9; border-right: 1px solid #e2e6dc; }
.admin-brand { color: #252923; font-size: 23px; font-weight: 700; letter-spacing: -1px; text-decoration: none; margin-bottom: 50px; }
.admin-brand > span:first-child { font-weight: 400; }
.admin-eyebrow { color: #89947d; font-size: 10px; font-weight: 600; letter-spacing: 1.7px; }
.admin-nav { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.admin-nav a { display: flex; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 7px; color: #737e67; text-decoration: none; font-size: 13px; }
.admin-nav a[aria-current="page"] { background: #eaf0e1; color: #46583a; font-weight: 600; }
.admin-nav a:hover { background: #f0f3ea; }
.admin-blog-menu summary { padding: 13px 14px; color: #737e67; font-size: 13px; cursor: pointer; border-radius: 7px; }
.admin-blog-menu summary:hover { background: #f0f3ea; }
.admin-blog-menu summary > span { margin-right: 8px; }
.admin-blog-menu a { margin: 5px 0 0 25px; }
.content-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 26px; border-bottom: 1px solid #e9ece3; }
.content-row:last-child { border-bottom: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.delete-button { color: #a33737; border-color: #e7cccc; }
.delete-button:hover { background: #faf0f0; }
.row-actions button:disabled { opacity: .5; cursor: wait; }
.content-row > div { min-width: 0; overflow-wrap: anywhere; }
.content-row strong { font-size: 14px; font-weight: 500; }
.content-row div > span { display: block; margin-top: 7px; font-size: 12px; color: #808875; }
.secondary-button { flex-shrink: 0; background: transparent; border: 1px solid #dce2d3; border-radius: 6px; padding: 9px 14px; font: inherit; font-size: 13px; color: #46583a; cursor: pointer; }
.content-editor { width: min(600px, calc(100% - 32px)); max-height: 90svh; overflow-y: auto; padding: 30px; border: 1px solid #dce2d3; border-radius: 12px; background: #fafbf8; color: inherit; }
.content-editor::backdrop { background: rgb(25 35 20 / 35%); }
.content-editor form { display: flex; flex-direction: column; gap: 10px; }
.content-editor label { font-size: 13px; margin-top: 12px; }
.content-editor input, .content-editor select, .content-editor textarea { width: 100%; padding: 11px; font: inherit; font-size: 14px; color: inherit; background: white; border: 1px solid #dce2d3; border-radius: 6px; }
.content-editor textarea { resize: vertical; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
#content-message { color: #62744f; font-size: 13px; }
.public-post { padding: 26px; margin-bottom: 20px; border: 1px solid #e2e6dc; border-radius: 10px; overflow-wrap: anywhere; }
.post-meta { color: #808875; font-size: 12px; }
.post-content { white-space: pre-wrap; line-height: 1.8; font-size: 14px; }
.admin-account { margin-top: auto; padding-top: 36px; }
.admin-profile { display: flex; align-items: center; gap: 11px; border-top: 1px solid #e2e6dc; padding-top: 22px; }
.admin-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #eaf0e1; color: #5b7048; font-size: 14px; }
.admin-profile strong { display: block; font-size: 13px; font-weight: 600; }
.admin-profile div > span { display: block; margin-top: 5px; font-size: 11px; color: #8a937f; }
.admin-logout { display: flex; justify-content: space-between; width: 100%; margin-top: 20px; padding: 10px 0; border: 0; background: transparent; color: #737e67; font: inherit; font-size: 12px; cursor: pointer; }
.admin-welcome { padding: clamp(26px, 4vw, 50px); border: 1px solid #dfe6d6; border-radius: 12px; background: #eef2e7; }
.admin-welcome h2 { font-size: clamp(23px, 3vw, 32px); letter-spacing: -.8px; margin: 22px 0 14px; }
.admin-welcome p { color: #7b8670; font-size: 14px; line-height: 1.8; }
.admin-text-link { display: inline-flex; gap: 24px; margin-top: 24px; color: #46583a; font-size: 13px; font-weight: 600; text-decoration: none; }
.admin-panel { background: #fcfdf9; border: 1px solid #e2e6dc; border-radius: 12px; overflow: hidden; }
.admin-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 23px 26px; border-bottom: 1px solid #e9ece3; }
.admin-panel-heading h2 { margin: 0; font-size: 14px; font-weight: 600; }
.admin-empty { text-align: center; padding: 70px 20px; }
.admin-empty-symbol { display: inline-grid; place-items: center; width: 46px; height: 46px; background: #eff3e8; color: #8c9a7d; border-radius: 12px; }
.admin-empty h3 { font-size: 15px; font-weight: 500; margin: 20px 0 10px; }
.admin-empty p { font-size: 13px; color: #8a937f; }
@media (max-width: 700px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); }
  .admin-main { grid-column: 1; grid-row: 2; }
  .admin-sidebar { grid-row: 1; padding: 20px; border-left: 0; border-bottom: 1px solid #e2e6dc; }
  .admin-brand { margin-bottom: 20px; }
  .admin-nav { flex-direction: row; }
  .admin-account { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 18px; }
  .admin-profile { border-top: 0; padding-top: 0; }
  .admin-logout { width: auto; gap: 16px; margin: 0 0 0 auto; }
  .admin-topbar { min-height: 66px; }
  .admin-page-heading { margin-top: 30px; }
}
.page-layout { display: grid; grid-template-columns: minmax(32px, 1fr) minmax(0, 840px) minmax(32px, 1fr); min-height: 100svh; }
.page-content { display: flex; flex-direction: column; min-width: 0; }
.site-header { position: relative; padding: 84px 0 43px; text-align: center; }
.page-links { position: absolute; top: 20px; right: 0; display: flex; gap: 22px; }
.page-links a { padding: 6px 0; color: #73796d; font-size: 13px; text-decoration: none; }
.page-links a:hover { color: #46583a; }
.wordmark { font-size: clamp(34px, 5vw, 46px); font-weight: 750; letter-spacing: -2px; text-decoration: none; color: inherit; }
.wordmark > span:first-child { font-weight: 400; }
.brand-dot { color: #70825c; }
.site-header p { margin: 15px 0 0; color: #81857b; font-size: 14px; line-height: 1.7; }
main { flex: 1; }
.categories { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 0 0 31px; border-bottom: 1px solid #e5e8df; }
.category { border: 1px solid transparent; background: transparent; color: #73796d; padding: 10px 15px; font: inherit; font-size: 13px; border-radius: 6px; cursor: pointer; transition: background .15s, color .15s; }
.category:hover { background: #edf0e7; color: #394631; }
.category.active { background: #e9eedf; color: #46583a; border-color: #e0e7d5; font-weight: 600; }
a:focus-visible, button:focus-visible { outline: 2px solid #70825c; outline-offset: 4px; }
.posts { padding-top: 37px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h1 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.4px; }
.post-count { font-size: 12px; color: #909588; }
.blog-list { margin-top: 23px; }
.empty-state { min-height: 330px; padding: 51px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border: 1px dashed #dce2d3; border-radius: 10px; background: #f7f9f3; }
.empty-icon { display: grid; place-items: center; height: 52px; width: 52px; background: #ebf0e3; color: #7a8967; border-radius: 50%; margin-bottom: 22px; }
h2 { font-size: 18px; font-weight: 500; letter-spacing: -.3px; margin: 0 0 11px; }
.empty-state p { font-size: 13px; line-height: 1.85; color: #8b9083; margin: 0; }
.soon-label { margin-top: 24px; font-size: 9px; letter-spacing: 2px; color: #8b977c; }
footer { margin-top: 80px; padding: 24px 0 27px; border-top: 1px solid #e5e8df; display: flex; justify-content: space-between; align-items: center; gap: 16px; color: #969b8e; font-size: 11px; }
footer > span { font-weight: 600; color: #7c8474; }
footer p { margin: 0; }
@media (min-width: 1200px) { .page-layout { grid-template-columns: minmax(180px, 1fr) minmax(0, 840px) minmax(180px, 1fr); column-gap: 24px; } }
@media (max-width: 600px) {
  .page-layout { grid-template-columns: 20px minmax(0, 1fr) 20px; }
  .site-header { padding-top: 72px; padding-bottom: 30px; }
  .site-header p { font-size: 12px; }
  .categories { gap: 5px; padding-bottom: 24px; }
  .category { padding: 9px 12px; font-size: 12px; }
  .posts { padding-top: 28px; }
  .empty-state { min-height: 310px; }
  h2 { font-size: 16px; }
  footer { margin-top: 55px; flex-direction: column; gap: 8px; }
}

/* Guided blog builder */
[hidden] { display: none !important; }
.builder-steps { display: flex; flex-wrap: wrap; gap: 10px 25px; list-style: none; margin: 0 0 30px; padding: 0 0 20px; border-bottom: 1px solid #e2e6dc; color: #8a937f; font-size: 12px; }
.builder-steps [aria-current="step"] { color: #46583a; font-weight: 700; }
#builder-message { font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
#builder-message:empty { display: none; }
.builder-stage { padding: clamp(24px, 4vw, 45px); border: 1px solid #dfe6d6; border-radius: 12px; background: #fcfdf9; }
.builder-stage h2 { font-size: 26px; margin: 18px 0 12px; }
.builder-stage > p { font-size: 14px; color: #808875; line-height: 1.7; }
.builder-stage label { display: block; margin: 30px 0 10px; font-size: 13px; }
.builder-stage select { display: block; width: min(100%, 460px); margin-bottom: 25px; padding: 15px; border: 1px solid #dce2d3; border-radius: 7px; background: #fafbf8; font: inherit; color: inherit; }
.format-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 30px 0; }
.format-card { display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 18px; font: inherit; color: inherit; background: #fafbf8; border: 1px solid #dfe6d6; border-radius: 9px; cursor: pointer; transition: border-color .15s, background .15s; }
.format-card:hover { border-color: #7f936b; background: #f2f5eb; }
.format-card > strong { margin-top: 22px; font-size: 16px; }
.format-description { display: block; margin-top: 10px; font-size: 12px; line-height: 1.8; color: #808875; flex: 1; }
.format-mini { display: flex; flex-direction: column; gap: 9px; padding: 18px; background: white; border: 1px solid #e3e8dc; border-radius: 4px; min-height: 160px; }
.mini-title { width: 80%; height: 8px; border-radius: 2px; background: #7f8e70; }
.mini-cover { height: 48px; background: #e4eadb; border-radius: 3px; }
.mini-row { display: flex; align-items: center; gap: 8px; min-height: 10px; }
.mini-line { flex: 1; height: 5px; background: #e0e5d9; border-radius: 2px; }
.mini-number { font-size: 9px; color: #70825c; }
.format-listicle .mini-row { border: 1px solid #e9ece3; padding: 3px; }
.format-guide .mini-number { border: 1px solid #e4eadb; border-radius: 50%; padding: 2px 5px; }
.builder-context { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; font-size: 13px; color: #70825c; margin: 24px 0; }
.builder-map { max-width: 900px; margin: auto; }
.map-block { margin-bottom: 22px; padding: clamp(20px, 3vw, 35px); border: 1px solid #dfe6d6; border-radius: 10px; background: #fcfdf9; }
.map-label { display: block; color: #89947d; font-size: 10px; letter-spacing: 1.6px; margin-bottom: 24px; }
.builder-map label { display: block; font-size: 13px; font-weight: 500; margin: 16px 0 10px; }
.builder-map label span { font-weight: 400; color: #929b86; }
.builder-map input:not([type="file"]), .builder-map textarea { width: 100%; font: inherit; font-size: 14px; line-height: 1.7; padding: 13px; background: #fafbf8; border: 1px solid #dce2d3; border-radius: 6px; color: inherit; }
.builder-map textarea { resize: vertical; min-height: 110px; }
.builder-map input::placeholder, .builder-map textarea::placeholder { color: #99a08f; }
.builder-map input:focus-visible, .builder-map textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid #70825c; outline-offset: 3px; }
#blog-title { font-size: 23px; }
.image-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; aspect-ratio: 16 / 9; max-height: 420px; width: 100%; border: 1px dashed #cfd8c3; border-radius: 8px; background: #f2f5eb; overflow: hidden; color: #849474; font-size: 12px; }
.image-slot-section { aspect-ratio: 3 / 2; max-width: 440px; max-height: 290px; }
.image-slot img { width: 100%; height: 100%; object-fit: cover; }
.upload-symbol { font-size: 28px; }
.field-hint { font-size: 11px; line-height: 1.8; color: #8b957e; }
.builder-map input[type="file"] { display: block; max-width: 100%; font-size: 12px; margin-bottom: 18px; }
.builder-map input[type="file"]::file-selector-button { padding: 9px 14px; border: 1px solid #dce2d3; border-radius: 6px; background: #edf2e6; color: #46583a; cursor: pointer; margin-right: 12px; }
.section-editor { min-width: 0; padding: 22px; margin: 25px 0; border: 1px solid #dfe6d6; border-radius: 8px; }
.section-editor legend { padding: 0 10px; color: #657653; font-size: 13px; font-weight: 600; }
.section-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.section-controls button { font-size: 10px; padding: 6px 9px; }
.section-image-field { margin-top: 25px; }
#section-guidance { font-size: 13px; line-height: 1.8; color: #808875; }
.builder-save { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; position: sticky; bottom: 0; padding: 18px 20px; background: #fcfdf9; border: 1px solid #dfe6d6; border-radius: 9px; box-shadow: 0 -4px 20px rgb(40 55 30 / 4%); z-index: 2; }
#save-state { margin-right: auto; font-size: 12px; color: #89947d; }
button:disabled { opacity: .5; cursor: default; }
.preview-toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 20px; padding: 22px; background: #edf2e6; border: 1px solid #dfe6d6; border-radius: 9px; }
.preview-toolbar p { font-size: 12px; color: #808875; margin: 8px 0 0; }
.preview-sizes { display: flex; justify-content: center; gap: 8px; margin: 22px 0; }
.preview-sizes [aria-pressed="true"] { background: #e4eadb; }
.preview-frame { max-width: 900px; margin: 0 auto; background: #fafbf8; border: 1px solid #dfe6d6; border-radius: 10px; overflow: hidden; }
.preview-frame.mobile-preview { max-width: 390px; }
.reader-article { container-type: inline-size; overflow-wrap: anywhere; }
.reader-header { padding: 42px 32px 30px; text-align: center; }
.reader-meta { font-size: 12px; color: #839172; line-height: 1.8; }
.reader-header h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(28px, 5cqw, 48px); line-height: 1.2; letter-spacing: -1px; font-weight: 500; margin: 22px 0; }
.reader-subtitle { max-width: 660px; margin: auto; font-size: 16px; color: #7f8875; line-height: 1.8; }
.reader-cover { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.reader-body { max-width: 740px; padding: 36px 28px; margin: auto; }
.reader-text { white-space: pre-wrap; font-size: 16px; line-height: 1.9; color: #58614f; }
.reader-intro { font-size: 18px; }
.reader-section { margin: 36px 0; scroll-margin-top: 20px; }
.reader-section h2, .reader-closing h2 { font-size: 24px; line-height: 1.4; margin: 14px 0 20px; }
.reader-section-image { display: block; width: 100%; height: auto; border-radius: 6px; aspect-ratio: 3 / 2; object-fit: cover; }
.reader-number { display: inline-block; color: #778c61; font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; }
.reader-contents { display: flex; flex-direction: column; gap: 12px; padding: 24px; margin: 30px 0; background: #edf2e6; border-radius: 8px; }
.reader-contents strong { font-size: 14px; margin-bottom: 8px; }
.reader-contents a { font-size: 13px; line-height: 1.7; color: #657653; text-decoration: none; }
.reader-guide .reader-section { padding-left: 22px; border-left: 2px solid #dbe4ce; }
.reader-listicle .reader-section { padding: 25px; background: #f3f6ed; border: 1px solid #e2e8d9; border-radius: 9px; }
.reader-closing { border-top: 1px solid #dfe6d6; padding-top: 22px; margin-top: 40px; }
.public-story { width: min(900px, calc(100% - 40px)); margin: 40px auto 80px; }
.post-card { padding: 0; overflow: hidden; }
.post-card-link { display: block; color: inherit; text-decoration: none; }
.post-card-image { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; }
.post-card-info { padding: 26px; }
.post-card-info h2 { font-size: 24px; line-height: 1.4; }
.post-excerpt { font-size: 14px; line-height: 1.8; color: #808875; }
.post-card .admin-text-link { margin-top: 10px; }
@media (max-width: 1000px) { .format-cards { grid-template-columns: 1fr; } .format-mini { min-height: 130px; max-width: 300px; width: 100%; align-self: center; } }
@media (max-width: 600px) { .image-slot strong { text-align: center; font-size: 12px; } .reader-header { padding: 26px 18px; } .reader-body { padding: 24px 18px; } .section-editor { padding: 14px; } .builder-save { padding: 14px; } .preview-toolbar .row-actions { flex-wrap: wrap; } }
.account-link { display: block; margin-top: 18px; color: #62744f; font-size: 12px; text-decoration: none; }
#password-message { font-size: 13px; line-height: 1.7; }
.live-edit-status { font-size: 13px; line-height: 1.7; color: #70825c; margin: 18px 0; }
.live-edit-status:empty { display: none; }
#toggle-live-edit[aria-pressed="true"] { background: #dae6cb; border-color: #91a978; }
.live-edit-text { outline: 1px dashed #b5c7a1; outline-offset: 6px; border-radius: 2px; cursor: text; min-height: 1.4em; white-space: pre-wrap; }
.live-edit-text:hover { outline-color: #708b53; }
.live-edit-text:focus { outline: 2px solid #708b53; background: #f5f8ef; }
.live-edit-text:empty::before { content: attr(data-placeholder); color: #909e80; font-family: inherit; font-size: .8em; pointer-events: none; }
.live-edit-image { cursor: pointer; outline: 2px dashed #91a978; outline-offset: -5px; }
.live-edit-image:hover, .live-edit-image:focus-visible { outline: 3px solid #708b53; outline-offset: -5px; filter: brightness(.95); }
.reader-image-placeholder { display: block; width: 100%; min-height: 100px; margin: 20px 0; border: 1px dashed #b5c7a1; background: #f0f4e9; color: #70825c; font: inherit; font-size: 13px; cursor: pointer; }
.public-live-edit { display: inline-block; margin-bottom: 25px; text-decoration: none; }
.row-actions a { text-decoration: none; }
#live-image-dialog .image-slot { max-height: 250px; }
.preview-toolbar { position: sticky; top: 0; z-index: 3; }
.reader-buy-ebook{display:inline-block;margin-top:28px;padding:14px 26px;border-radius:7px;background:#60734b;color:#fff;text-decoration:none;font-weight:600}.reader-buy-ebook:hover{background:#435633}#blog-ebookLabel::placeholder{color:#a6aaa1;opacity:1}
.format-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:20px}.format-card{cursor:default}.format-preview-dialog{width:min(960px,calc(100vw - 32px));max-height:90vh;box-sizing:border-box;overflow:auto;border:1px solid #dfe6d6;border-radius:12px;padding:24px}.format-preview-dialog::backdrop{background:#17201499}.format-preview-dialog .preview-toolbar{position:sticky;top:-24px;background:white;z-index:2;padding:16px 0}.format-preview-dialog h2{margin:0}.format-preview-note{color:#737a6c;font-size:14px}.format-preview-dialog .reader-article{margin-top:24px}
