/* ============ Bloggr — styles ============ */

* { box-sizing: border-box; }

:root {
  --bg: #f6f5f1;
  --card: #ffffff;
  --ink: #21242c;
  --muted: #71727a;
  --line: #e6e3dc;
  --accent: #e8641c;
  --accent-ink: #c8510f;
  --accent-soft: #fdeee2;
  --green: #1c7c4a;
  --green-soft: #e3f4ea;
  --red: #c23636;
  --red-soft: #fbeaea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 20, 25, .05), 0 10px 28px -14px rgba(20, 20, 25, .14);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* blog themes (applied via body[data-theme]) */
body[data-theme="sunrise"]  { --th1: #f59a3c; --th2: #e8641c; --link: #c8510f; }
body[data-theme="forest"]   { --th1: #3d8f68; --th2: #27694a; --link: #226b4a; }
body[data-theme="ocean"]    { --th1: #3f7fb5; --th2: #2b5d8a; --link: #2b6a9e; }
body[data-theme="plum"]     { --th1: #8d6bbd; --th2: #6a4d99; --link: #6d4fa0; }
body[data-theme="midnight"] { --th1: #3a4157; --th2: #232838; --link: #3d4a6b; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
body { --th1: #f59a3c; --th2: #e8641c; --link: #c8510f; } /* default until a blog page overrides */

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
a { color: var(--link, var(--accent-ink)); }

h1, h2, h3 { line-height: 1.2; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink); font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; font-family: inherit; line-height: 1.3;
}
.btn:hover { border-color: #c9c6bd; background: #faf9f6; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-danger { color: var(--red); border-color: #efcfcf; }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.btn-lg { padding: 12px 24px; font-size: 16px; }
.btn-sm { padding: 5px 11px; font-size: 13px; }

/* ---------- forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 5px; color: #4c4a52; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent);
}
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

/* ---------- top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topnav .wrap { display: flex; align-items: center; gap: 18px; height: 58px; }
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 22px;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.brand span { color: var(--accent); }
.topnav nav { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topnav nav > a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.topnav nav > a:not(.btn):hover { color: var(--accent-ink); }
.nav-user { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }

/* ---------- home ---------- */
.hero { padding: 84px 0 66px; text-align: center; background:
  radial-gradient(900px 380px at 18% -12%, #ffe4c9, transparent),
  radial-gradient(700px 300px at 88% -20%, #ffe9d9, transparent);
}
.hero h1 { font-family: var(--serif); font-size: clamp(34px, 6vw, 54px); margin: 0 0 14px; letter-spacing: -.015em; }
.hero p { font-size: 18px; color: #55535c; max-width: 560px; margin: 0 auto 26px; line-height: 1.55; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.home-main { padding: 34px 20px 70px; max-width: 1060px; margin: 0 auto; }
.home-main > h2 { font-size: 22px; margin: 0 0 16px; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.blog-card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  overflow: hidden; transition: transform .18s, box-shadow .18s;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 2px 3px rgba(20,20,25,.06), 0 18px 40px -16px rgba(20,20,25,.22); }
.bc-cover {
  position: relative;
  background: linear-gradient(125deg, var(--t1), var(--t2));
  padding: 24px 22px 18px; min-height: 116px; color: #fff;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.bc-art { position: absolute; inset: 0; overflow: hidden; }
.bc-art svg { width: 100%; height: 100%; display: block; }
.bc-cover h3, .bc-cover .bc-by, .bc-cover .bc-fresh, .bc-initial { z-index: 1; }
.bc-initial {
  position: absolute; top: -14px; right: 10px;
  font-family: var(--serif); font-size: 104px; font-weight: 700; line-height: 1;
  color: rgba(255, 255, 255, .16); pointer-events: none; user-select: none;
}
.bc-fresh {
  position: absolute; top: 12px; left: 14px;
  background: rgba(255, 255, 255, .24); color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; letter-spacing: .02em;
}
.bc-cover h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 6px; color: #fff; line-height: 1.15; position: relative; }
.bc-by { font-size: 12.5px; opacity: .94; position: relative; }
.bc-by a { color: #fff; text-decoration: none; }
.bc-by a:hover { text-decoration: underline; }
.bc-body { flex: 1; display: flex; flex-direction: column; }
.blog-card .bc-body p {
  margin: 0; padding: 14px 22px 4px; color: #55535c; font-size: 14px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card .meta { padding: 10px 22px 16px; font-size: 12.5px; color: var(--muted); margin-top: auto; }

/* featured card: first blog, spans two columns, cover on the left */
.blog-card.featured, .blog-card.wide { grid-column: span 2; }
.blog-card.featured { flex-direction: row; }
.blog-card.featured .bc-cover { width: 42%; min-height: 168px; flex-shrink: 0; }
.blog-card.featured .bc-initial { font-size: 140px; top: -18px; }
.blog-card.featured h3 { font-size: 26px; }
.blog-card.featured .bc-body { justify-content: center; padding: 6px 0 2px; }
.blog-card.featured .bc-body p { -webkit-line-clamp: 4; padding-top: 0; padding-bottom: 8px; font-size: 15px; }

@media (max-width: 720px) {
  .blog-card.featured, .blog-card.wide { grid-column: span 1; }
  .blog-card.featured { flex-direction: column; }
  .blog-card.featured .bc-cover { width: 100%; min-height: 116px; }
  .blog-card.featured .bc-initial { font-size: 104px; }
  .blog-card.featured h3 { font-size: 22px; }
  .blog-card.featured .bc-body { justify-content: flex-start; }
  .blog-card.featured .bc-body p { padding-top: 14px; }
}
.t-sunrise  { --t1: #f59a3c; --t2: #e8641c; }
.t-forest   { --t1: #3d8f68; --t2: #27694a; }
.t-ocean    { --t1: #3f7fb5; --t2: #2b5d8a; }
.t-plum     { --t1: #8d6bbd; --t2: #6a4d99; }
.t-midnight { --t1: #3a4157; --t2: #232838; }

.empty {
  padding: 46px 24px; text-align: center; color: var(--muted);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- auth ---------- */
.auth-card {
  max-width: 410px; margin: 60px auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 30px 30px 26px; box-shadow: var(--shadow);
}
.auth-card h1 { font-family: var(--serif); font-size: 26px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.auth-alt { text-align: center; font-size: 13.5px; color: var(--muted); margin-top: 16px; }
.demo-hint {
  background: var(--accent-soft); border-radius: 10px; padding: 10px 14px;
  font-size: 13px; margin-top: 18px; display: flex; align-items: center; gap: 10px; justify-content: space-between;
}
.form-error { background: var(--red-soft); color: var(--red); border-radius: 10px; padding: 9px 13px; font-size: 13.5px; margin-bottom: 14px; display: none; }
.form-error.show { display: block; }

/* ---------- dashboard ---------- */
.dash { display: grid; grid-template-columns: 216px 1fr; gap: 26px; max-width: 1120px; margin: 26px auto; padding: 0 20px 70px; }
.dash-side { position: sticky; top: 78px; align-self: start; }
.dash-side .switcher { margin-bottom: 14px; }
.dash-side .switcher select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-weight: 600; background: #fff; font-family: inherit;
}
.dash-side a {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.dash-side a:hover { background: #edebe5; }
.dash-side a.active { background: var(--accent-soft); color: var(--accent-ink); }
.dash-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.dash-head h1 { font-family: var(--serif); font-size: 26px; margin: 0; }
.dash-head .sub { color: var(--muted); font-size: 13.5px; width: 100%; margin-top: -8px; }
.dash-head .grow { flex: 1; }

table.posts { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; }
table.posts th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); background: #fafaf7;
}
table.posts td { padding: 13px 14px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
table.posts tr:last-child td { border-bottom: none; }
table.posts tbody tr:hover td { background: #fbfaf7; }
td.pt-title a { color: var(--ink); text-decoration: none; font-weight: 700; }
td.pt-title a:hover { color: var(--accent-ink); }
tr.is-draft td.pt-title a { color: #77747e; }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.badge.pub { background: var(--green-soft); color: var(--green); }
.badge.draft { background: #eceae4; color: #77747e; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #f1efe8; color: #5d5c63; font-size: 12px; margin: 1px 2px 1px 0; }
.dim { color: var(--muted); font-size: 13px; }

.my-blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.my-blog-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.my-blog-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 5px; background: linear-gradient(90deg, var(--t1), var(--t2)); }
.my-blog-card h3 { font-family: var(--serif); margin: 2px 0 2px; font-size: 20px; }
.my-blog-card .addr { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.my-blog-card .row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 18px; }
.panel h2 { margin: 0 0 6px; font-size: 19px; }
.panel .sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.danger h2 { color: var(--red); }

.theme-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.theme-opt { display: flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 13px 6px 7px; cursor: pointer; font-size: 13.5px; font-weight: 600; background: #fff; }
.theme-opt input { display: none; }
.theme-opt .dot { width: 20px; height: 20px; border-radius: 50%; background: linear-gradient(135deg, var(--t1), var(--t2)); }
.theme-opt.picked { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- editor ---------- */
.editor-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 22px; max-width: 1020px; margin: 22px auto; padding: 0 20px 80px; }
.editor-main { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px 28px 30px; box-shadow: var(--shadow); }
.editor-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.editor-bar .grow { flex: 1; }
#e-title {
  font-family: var(--serif); font-size: 30px; border: none; outline: none; width: 100%;
  padding: 8px 0 4px; background: transparent; font-weight: 700;
}
#e-title::placeholder { color: #c4c1b8; }
.toolbar {
  display: flex; gap: 2px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 11px;
  background: #fafaf7; padding: 4px; margin: 10px 0 4px; width: fit-content;
  position: sticky; top: 68px; z-index: 5;
}
.toolbar button {
  border: none; background: none; padding: 6px 10px; border-radius: 8px; cursor: pointer;
  font-size: 14px; color: #44424b; font-family: inherit;
}
.toolbar button:hover { background: #eceae3; }
.toolbar .sep { width: 1px; background: var(--line); margin: 5px 3px; }
.editable {
  min-height: 56vh; outline: none; font-family: var(--serif); font-size: 17.5px; line-height: 1.75;
  padding: 10px 2px;
}
.editable:empty::before { content: attr(data-ph); color: #c4c1b8; }
.editable h2 { font-size: 24px; margin: 1.1em 0 .35em; }
.editable h3 { font-size: 19.5px; margin: 1.1em 0 .35em; }
.editable blockquote { margin: 1em 0; padding: .15em 0 .15em 1.1em; border-left: 3px solid var(--accent); color: #4b4952; font-style: italic; }
.editable ul, .editable ol { padding-left: 1.5em; }
.editable img { max-width: 100%; border-radius: 10px; margin: .5em 0; }
.editable pre { background: #23262e; color: #ece9e2; padding: 14px 16px; border-radius: 10px; overflow: auto; font-size: 14.5px; }
.editable a { color: var(--accent-ink); }
.editor-side { display: flex; flex-direction: column; gap: 16px; }
.editor-side .panel { position: sticky; top: 78px; }
.stat-row { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.stat-row:last-child { border-bottom: none; }
.stat-row span:first-child { color: var(--muted); }

/* ---------- public blog ---------- */
.blog-hero { padding: 66px 20px 54px; color: #fff; background: linear-gradient(125deg, var(--th1), var(--th2)); }
.blog-hero .wrap { max-width: 1000px; }
.blog-hero h1 { font-family: var(--serif); font-size: clamp(32px, 5.5vw, 46px); margin: 0 0 8px; letter-spacing: -.01em; }
.blog-hero p { margin: 0; opacity: .93; font-size: 16.5px; max-width: 620px; line-height: 1.5; }
.blog-hero .byline { margin-top: 14px; font-size: 13px; opacity: .85; }
.blog-hero .byline a { color: inherit; text-decoration: none; }
.blog-hero .byline a:hover { text-decoration: underline; }

.blog-body { display: grid; grid-template-columns: 1fr 282px; gap: 38px; max-width: 1000px; margin: 34px auto; padding: 0 20px 80px; align-items: start; }
.feed-link { color: #fff; opacity: .85; font-size: 13px; text-decoration: none; margin-top: 12px; display: inline-block; }
.feed-link:hover { opacity: 1; }

.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px 26px; margin-bottom: 20px; box-shadow: var(--shadow); }
.post-card h2 { font-family: var(--serif); font-size: 27px; margin: 0 0 6px; letter-spacing: -.01em; }
.post-card h2 a { color: inherit; text-decoration: none; }
.post-card h2 a:hover { text-decoration: underline; text-decoration-color: var(--th1); text-underline-offset: 4px; }
.post-meta { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post-meta a { color: inherit; }
.post-content { font-family: var(--serif); font-size: 16.5px; line-height: 1.78; }
.post-content h2 { font-size: 22px; margin: 1.1em 0 .35em; }
.post-content h3 { font-size: 18.5px; }
.post-content blockquote { margin: 1em 0; padding: .15em 0 .15em 1.1em; border-left: 3px solid var(--th1); color: #4b4952; font-style: italic; }
.post-content img { max-width: 100%; border-radius: 10px; }
.post-content pre { background: #23262e; color: #ece9e2; padding: 14px 16px; border-radius: 10px; overflow: auto; font-size: 14px; }

.widget { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.widget h3 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 4px 0; font-size: 14px; }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }
.widget .count { color: var(--muted); font-size: 12px; }
.widget .search-row { display: flex; gap: 6px; }
.widget .search-row input { flex: 1; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: 14px; font-family: inherit; }
.filter-note { background: var(--accent-soft); border-radius: 10px; padding: 8px 14px; font-size: 13.5px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- comments ---------- */
.comments { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 32px; margin-top: 8px; box-shadow: var(--shadow); }
.comments h3 { margin: 0 0 6px; font-size: 19px; }
.comment { display: flex; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.comment:last-of-type { border-bottom: none; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--th1), var(--th2)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.c-head { font-size: 13.5px; margin-bottom: 3px; }
.c-head b { font-size: 14.5px; }
.c-head span { color: var(--muted); margin-left: 7px; font-size: 12.5px; }
.comment p { margin: 0; font-size: 14.5px; line-height: 1.6; white-space: pre-wrap; }
.c-del { margin-left: auto; border: none; background: none; color: var(--muted); cursor: pointer; font-size: 12.5px; }
.c-del:hover { color: var(--red); }
.c-form { margin-top: 18px; display: grid; gap: 10px; }
.c-form input, .c-form textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14.5px; font-family: inherit;
}
.c-form textarea { min-height: 84px; resize: vertical; }
.c-form input:focus, .c-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

/* ---------- landing page (Blogger-style feature showcase) ---------- */
.hero-stat { margin-top: 18px; font-size: 13px; color: #8a8892; }

.feat { padding: 54px 0; }
.feat.flip { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feat-inner { display: grid; grid-template-columns: 1fr 1.12fr; gap: 52px; align-items: center; max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.feat.flip .feat-text { order: 2; }
.feat h2 { font-family: var(--serif); font-size: 30px; margin: 0 0 12px; letter-spacing: -.01em; }
.feat p { font-size: 17px; color: #55535c; line-height: 1.65; margin: 0; }

/* mockups */
.mock { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px 24px; font-size: 14px; }
.feat.flip .mock { background: var(--bg); }
.mbar { height: 10px; border-radius: 6px; background: #edebe5; margin: 9px 0; }
.mtools { display: inline-flex; gap: 2px; border: 1px solid var(--line); border-radius: 9px; background: #fafaf7; padding: 3px; margin-bottom: 10px; }
.mtools span { padding: 3px 9px; border-radius: 6px; color: #44424b; font-size: 13px; }
.mtitle { font-family: var(--serif); font-size: 22px; font-weight: 700; margin: 8px 0 6px; }
.mquote { height: 34px; border-left: 3px solid var(--accent); background: #faf9f6; border-radius: 0 8px 8px 0; margin: 10px 0; }
.msaved { font-size: 12.5px; color: var(--green); margin-top: 12px; }
.mock-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-theme { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; padding-bottom: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.mini-theme .mt-head { height: 42px; background: linear-gradient(120deg, var(--t1), var(--t2)); margin-bottom: 9px; }
.mini-theme .mt-line { height: 7px; border-radius: 4px; background: #edebe5; margin: 6px auto 0; }
.msearch { border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; color: var(--muted); background: #fafaf7; }
.march { display: flex; justify-content: space-between; padding: 9px 2px; border-bottom: 1px dashed var(--line); font-size: 14px; }
.march:last-of-type { border-bottom: none; }
.mnote { font-size: 13px; color: #6d6b74; margin-top: 12px; line-height: 1.5; }
.mcmt { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.mcmt b { font-size: 13.5px; }
.mbubble { height: 12px; border-radius: 6px; background: #edebe5; margin-top: 5px; width: 82%; }
.mtoggle { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; font-size: 13.5px; color: #55535c; }
.pill { background: var(--green-soft); color: var(--green); font-weight: 700; border-radius: 999px; padding: 2px 10px; font-size: 12px; }
.mini-blogcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; position: relative; overflow: hidden; background: #fff; }
.mini-blogcard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--t1), var(--t2)); }
.mini-blogcard b { display: block; font-family: var(--serif); font-size: 16px; margin-top: 3px; }
.mini-blogcard span { font-size: 12.5px; color: var(--muted); }
.mfile { font-family: ui-monospace, Menlo, monospace; font-size: 13.5px; background: #f4f2ec; border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; margin-bottom: 8px; }

@media (max-width: 900px) {
  .feat-inner { grid-template-columns: 1fr; gap: 24px; }
  .feat.flip .feat-text { order: 0; }
  .mock-themes { grid-template-columns: repeat(2, 1fr); }
  .feat { padding: 38px 0; }
}

/* ---------- footer + legal ---------- */
.site-foot { border-top: 1px solid var(--line); padding: 22px 0 26px; margin-top: 26px; color: var(--muted); font-size: 13px; background: var(--bg); }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.legal { max-width: 760px; margin: 40px auto 0; padding: 0 20px 60px; }
.legal h1 { font-family: var(--serif); font-size: 34px; margin: 0 0 8px; }
.legal h2 { font-family: var(--serif); font-size: 24px; margin: 34px 0 6px; }
.legal h3 { font-size: 16px; margin: 20px 0 4px; }
.legal p, .legal li { font-size: 15.5px; line-height: 1.7; color: #3c3a42; }
.legal ul { padding-left: 1.4em; }
.legal code { background: #f1efe8; border-radius: 6px; padding: 1px 6px; font-size: 14px; }
.acc-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.acc-row .field { margin-bottom: 0; }

/* ---------- misc ---------- */
#toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(16px);
  background: #23262e; color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: 80vw;
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: #8e2b2b; }

.error-page { text-align: center; padding: 110px 20px; }
.error-page h1 { font-family: var(--serif); font-size: 40px; margin: 0 0 8px; }

@media (max-width: 900px) {
  .blog-body, .editor-wrap, .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .dash-side .switcher { width: 100%; }
  .editor-side .panel { position: static; }
  .topnav .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .topnav nav { margin-left: 0; width: 100%; flex-wrap: wrap; }
}

/* ============ explore v3 — editorial discovery ============ */
.xp-loading { max-width: 1160px; margin: 60px auto 0; padding: 0 20px; }
.xp-head { max-width: 1160px; margin: 0 auto; padding: 28px 20px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.xp-head-txt h1 { font-family: var(--serif); font-size: 34px; margin: 0 0 4px; letter-spacing: -.015em; }
.xp-head-txt p { margin: 0; font-size: 13.5px; }
.xp-search { display: flex; gap: 8px; align-items: center; }
.xp-search input { width: min(320px, 62vw); padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14.5px; font-family: inherit; background: #fff; }
.xp-search input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.xp-topics { max-width: 1160px; margin: 0 auto; padding: 0 20px 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.xp-topics .chip { text-decoration: none; font-weight: 600; padding: 4px 13px; border: 1px solid transparent; }
.xp-topics .chip.on { background: var(--ink); color: #fff; }
.xp-searchbanner { max-width: 1160px; margin: 0 auto; padding: 0 20px 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13.5px; color: #55535c; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.xp-searchbanner a { color: var(--muted); }
.xp-wrap { max-width: 1160px; margin: 0 auto; padding: 24px 20px 70px; display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 48px; align-items: start; }

.xp-featured { padding: 4px 0 24px; margin-bottom: 8px; }
.xp-kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 10px; }
.xp-featured h2 { font-family: var(--serif); font-size: clamp(26px, 3.4vw, 36px); line-height: 1.14; margin: 0 0 10px; letter-spacing: -.015em; }
.xp-featured h2 a { color: var(--ink); text-decoration: none; }
.xp-featured h2 a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 5px; }
.xp-meta { font-size: 13px; color: var(--muted); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.xp-meta a { color: #4c4a52; text-decoration: none; font-weight: 600; }
.xp-meta a:hover { text-decoration: underline; }
.xp-meta .dot { opacity: .5; }
.xp-meta.sm { font-size: 12px; margin-top: 3px; }
.xp-excerpt { font-size: 16px; line-height: 1.62; color: #55535c; max-width: 660px; margin: 12px 0 0; }
.xp-labels { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.xp-labels .chip { text-decoration: none; }
.xp-labels .chip:hover { background: var(--accent-soft); color: var(--accent-ink); }

.xp-matchpubs { padding: 14px 0 18px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.xp-matchpubs h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.xp-pubrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }

.xp-feedhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 4px; }
.xp-feedhead h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0; font-weight: 700; }
.xp-tabs { display: flex; gap: 2px; background: #efece5; padding: 3px; border-radius: 999px; }
.xp-tabs a { padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #55535c; text-decoration: none; }
.xp-tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .09); }

.xp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 36px; }
.xp-card { padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.xp-card h3 { font-family: var(--serif); font-size: 18.5px; line-height: 1.25; margin: 0 0 7px; letter-spacing: -.005em; }
.xp-card h3 a { color: var(--ink); text-decoration: none; }
.xp-card h3 a:hover { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 4px; }
.xp-card p { margin: 9px 0 0; font-size: 13.5px; line-height: 1.55; color: #6c6a73; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xp-card .xp-labels { margin-top: 10px; }
.xp-pager { display: flex; gap: 10px; align-items: center; margin-top: 20px; }

.xp-railbox { border-top: 3px solid var(--ink); padding-top: 14px; margin-bottom: 30px; }
.xp-railbox h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 6px; font-weight: 700; }
.xp-trend { list-style: none; margin: 0; padding: 0; }
.xp-trend li { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.xp-trend li:last-child { border-bottom: none; }
.xp-num { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--accent); line-height: 1.1; min-width: 15px; }
.xp-t { font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--ink); text-decoration: none; display: block; }
.xp-t:hover { text-decoration: underline; }
.xp-pub { display: flex; gap: 11px; align-items: center; padding: 9px 0; text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); }
.xp-pub:last-child { border-bottom: none; }
.xp-pub:hover b { color: var(--accent-ink); }
.xp-mono { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 16px; flex-shrink: 0; }
.xp-pub-txt { min-width: 0; }
.xp-pub b { display: block; font-size: 14px; line-height: 1.2; }
.xp-pub small { color: var(--muted); font-size: 12px; }

@media (max-width: 980px) {
  .xp-wrap { grid-template-columns: 1fr; gap: 26px; }
  .xp-rail { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 640px) {
  .xp-rail { grid-template-columns: 1fr; }
  .xp-search { width: 100%; }
  .xp-search input { width: 100%; flex: 1; }
  .xp-pubrow { grid-template-columns: 1fr; }
}
