/*
Theme Name: Letter Symbol
Theme URI: https://lettersymbol.com/
Author: LetterSymbol.com
Description: Light pink theme made for the Letter Symbol tools plugin. Self-hosted Bricolage Grotesque and Plus Jakarta Sans fonts, full-width tool page template, readable blog and page typography, breadcrumbs support for Rank Math and Yoast.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lettersymbol
Tags: custom-logo, custom-menu, featured-images, blog, one-column, wide-blocks
*/

/* ---------- Fonts (SIL Open Font License, see assets/fonts) ---------- */
@font-face { font-family: 'Bricolage Grotesque'; src: url('assets/fonts/bricolage-grotesque.woff2') format('woff2'); font-weight: 400 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('assets/fonts/plus-jakarta-sans.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('assets/fonts/plus-jakarta-sans-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --lst-bg: #fff7fa;
  --lst-surface: #ffffff;
  --lst-petal: #fdebf2;
  --lst-line: #f4d3e0;
  --lst-rose: #c8406f;
  --lst-rose-dark: #a32e58;
  --lst-ink: #3d2233;
  --lst-muted: #86697a;
  --lst-heading: 'Bricolage Grotesque', 'Plus Jakarta Sans', system-ui, sans-serif;
  --lst-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --lst-content: 760px;
  --lst-wide: 1320px;
  --lst-gutter: clamp(16px, 4vw, 32px);
  --lst-radius: 20px;
  --lst-header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--lst-header-h) + 16px); }
body {
  margin: 0; background: var(--lst-bg); color: var(--lst-ink);
  font: 400 17px/1.7 var(--lst-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, video, svg { max-width: 100%; height: auto; }
a { color: var(--lst-rose); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--lst-rose-dark); }
:focus-visible { outline: 2px solid var(--lst-rose); outline-offset: 3px; border-radius: 4px; }
::selection { background: #f7c6d8; color: var(--lst-ink); }
h1, h2, h3, h4, h5, h6 { font-family: var(--lst-heading); color: var(--lst-ink); line-height: 1.15; letter-spacing: -0.02em; margin: 1.6em 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.2rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; }
p, ul, ol, dl, blockquote, figure, table, pre { margin: 0 0 1.2em; }
hr { border: 0; height: 1px; background: var(--lst-line); margin: 2.5em 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lst-skip { position: absolute; left: 12px; top: -60px; z-index: 1000; background: var(--lst-ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.lst-skip:focus { top: 12px; color: #fff; }

.lst-wrap { width: min(100% - 2 * var(--lst-gutter), var(--lst-content)); margin-inline: auto; }
.lst-wrap-wide { width: min(100% - 2 * var(--lst-gutter), var(--lst-wide)); margin-inline: auto; }

/* ---------- Header ---------- */
.lst-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 247, 250, 0.86); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--lst-line);
}
.admin-bar .lst-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .lst-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .lst-header { top: 0; } }
.lst-header-inner { width: min(100% - 2 * var(--lst-gutter), var(--lst-wide)); margin: 0 auto; min-height: var(--lst-header-h); display: flex; align-items: center; gap: 16px; }
.lst-brand, .custom-logo-link { margin: 0 auto 0 0; display: inline-flex; }
.lst-brand a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--lst-ink); font: 800 22px/1 var(--lst-heading); letter-spacing: -0.03em; }
.lst-brand-mark { width: 36px; height: 36px; border-radius: 12px; background: var(--lst-rose); color: #fff; display: grid; place-items: center; font-size: 19px; box-shadow: 0 6px 16px -8px rgba(200, 64, 111, .8); }
.custom-logo { max-height: 44px; width: auto; display: block; }
.lst-nav { display: flex; }
.lst-menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.lst-menu li { position: relative; margin: 0; }
.lst-menu a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--lst-ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.lst-menu a:hover, .lst-menu .current-menu-item > a, .lst-menu .current-menu-ancestor > a { background: var(--lst-petal); color: var(--lst-rose-dark); }
.lst-menu .sub-menu { list-style: none; margin: 0; padding: 8px; position: absolute; top: 100%; left: 0; min-width: 220px; background: #fff; border: 1px solid var(--lst-line); border-radius: 16px; box-shadow: 0 18px 40px -24px rgba(61, 34, 51, .35); opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.lst-menu li:hover > .sub-menu, .lst-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.lst-menu .sub-menu a { border-radius: 10px; }
.lst-menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--lst-line); background: #fff; border-radius: 14px; cursor: pointer; padding: 0; }
.lst-burger, .lst-burger::before, .lst-burger::after { display: block; width: 18px; height: 2px; background: var(--lst-ink); border-radius: 2px; margin: 0 auto; position: relative; transition: transform .2s, background .2s; }
.lst-burger::before, .lst-burger::after { content: ''; position: absolute; left: 0; }
.lst-burger::before { top: -6px; } .lst-burger::after { top: 6px; }
.lst-nav-open .lst-burger { background: transparent; }
.lst-nav-open .lst-burger::before { transform: translateY(6px) rotate(45deg); }
.lst-nav-open .lst-burger::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .lst-menu-toggle { display: block; }
  .lst-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--lst-bg); border-bottom: 1px solid var(--lst-line); padding: 8px var(--lst-gutter) 18px; box-shadow: 0 24px 40px -30px rgba(61, 34, 51, .4); }
  .lst-nav-open .lst-nav { display: block; }
  .lst-menu { flex-direction: column; align-items: stretch; }
  .lst-menu a { padding: 12px 14px; font-size: 16px; }
  .lst-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 0 14px; }
}

/* ---------- Page heads ---------- */
.lst-main { min-height: 60vh; }
.lst-page-head { padding: clamp(28px, 5vw, 56px) 0 8px; }
.lst-tool-head { padding: clamp(28px, 5vw, 52px) 0 clamp(16px, 3vw, 28px); text-align: center; }
.lst-title { margin: 0.2em 0 0.35em; }
.lst-lead { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem); color: var(--lst-muted); margin: 0 auto 0.5em; max-width: 60ch; }
.lst-meta { display: inline-flex; gap: 8px; align-items: center; color: var(--lst-muted); font-size: 14px; font-weight: 600; }
.lst-pill { display: inline-block; background: var(--lst-petal); color: var(--lst-rose-dark); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 700; text-decoration: none; }
.lst-crumbs { font-size: 13px; color: var(--lst-muted); margin-bottom: 10px; }
.lst-crumbs a { color: var(--lst-muted); text-decoration: none; }
.lst-crumbs a:hover { color: var(--lst-rose); }
.lst-hero-img { margin: 18px auto 8px; }
.lst-hero-img img { width: 100%; border-radius: var(--lst-radius); display: block; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Content ---------- */
.lst-content { padding-bottom: clamp(36px, 6vw, 72px); }
.lst-content > * { width: min(100% - 2 * var(--lst-gutter), var(--lst-content)); margin-inline: auto; }
.lst-content > .alignwide { width: min(100% - 2 * var(--lst-gutter), var(--lst-wide)); }
.lst-content > .alignfull { width: 100%; }
.lst-content-tool > .lsym-app,
.lst-content-tool > p:has(> .lsym-app) { width: min(100% - 2 * var(--lst-gutter), var(--lst-wide)); margin-bottom: clamp(32px, 5vw, 56px); }
.lst-content > :first-child { margin-top: 0; }
.lst-content h2 { padding-top: 0.2em; }
.lst-content h2::before { content: ''; display: block; width: 36px; height: 4px; border-radius: 4px; background: var(--lst-rose); margin-bottom: 14px; }
.lst-content ul, .lst-content ol { padding-left: 1.3em; }
.lst-content li { margin: 0.35em 0; padding-left: 0.2em; }
.lst-content ul li::marker { color: var(--lst-rose); content: '✦  '; font-size: 0.8em; }
.lst-content ol li::marker { color: var(--lst-rose); font-family: var(--lst-heading); font-weight: 700; }
.lst-content strong { font-weight: 700; color: var(--lst-ink); }
.lst-content blockquote, .wp-block-quote {
  border: 0; border-left: 4px solid var(--lst-rose); background: var(--lst-surface); border-radius: 0 var(--lst-radius) var(--lst-radius) 0;
  padding: 18px 22px; font-size: 1.08em;
}
.lst-content blockquote p:last-child { margin-bottom: 0; }
.lst-content blockquote cite { display: block; margin-top: 8px; font-size: 14px; color: var(--lst-muted); font-style: normal; }
.lst-content figure img, .lst-content .wp-block-image img { border-radius: 16px; }
.lst-content figcaption, .wp-element-caption { font-size: 14px; color: var(--lst-muted); text-align: center; margin-top: 8px; }
.lst-content table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; background: #fff; border: 1px solid var(--lst-line); border-radius: 16px; overflow: hidden; }
.lst-content .wp-block-table { overflow-x: auto; }
.lst-content th, .lst-content td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--lst-line); vertical-align: top; }
.lst-content th { background: var(--lst-petal); font-family: var(--lst-heading); font-weight: 700; }
.lst-content tr:last-child td { border-bottom: 0; }
.lst-content code, .lst-content kbd { background: var(--lst-petal); border-radius: 6px; padding: 2px 6px; font-size: 0.9em; }
.lst-content pre { background: var(--lst-ink); color: #fde9f1; padding: 18px; border-radius: 16px; overflow-x: auto; font-size: 14px; }
.lst-content pre code { background: none; padding: 0; }
.lst-content .wp-block-separator { border: 0; height: 1px; background: var(--lst-line); }

/* callout: add class "is-style-callout" or use a Group block with the Petal background */
.lst-content .has-petal-background-color, .lst-content .is-style-callout { border-radius: var(--lst-radius); padding: 20px 22px; }

/* buttons */
.lst-btn, .wp-block-button__link, .wp-element-button, .lst-search button, .comment-form .submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--lst-rose); color: #fff; border: 0; border-radius: 999px; padding: 12px 22px;
  font: 700 15px/1.2 var(--lst-body); text-decoration: none; cursor: pointer; transition: background-color .15s, transform .15s;
}
.lst-btn:hover, .wp-block-button__link:hover, .wp-element-button:hover, .lst-search button:hover, .comment-form .submit:hover { background: var(--lst-rose-dark); color: #fff; }
.is-style-outline > .wp-block-button__link { background: transparent; color: var(--lst-rose); border: 1.5px solid var(--lst-rose); }

/* FAQ: native details, Rank Math and Yoast FAQ blocks */
.lst-content details, .rank-math-faq-item, .schema-faq-section {
  background: #fff; border: 1px solid var(--lst-line); border-radius: 16px; padding: 4px 18px; margin: 0 auto 10px;
}
.lst-content details summary, .rank-math-question, .schema-faq-question {
  cursor: pointer; font: 700 1.05rem/1.4 var(--lst-heading); padding: 12px 0; list-style: none; display: block; color: var(--lst-ink); margin: 0;
}
.lst-content details summary::-webkit-details-marker { display: none; }
.lst-content details summary::after { content: '+'; float: right; color: var(--lst-rose); font-size: 1.3em; line-height: 1; }
.lst-content details[open] summary::after { content: '−'; }
.lst-content details[open] { padding-bottom: 12px; }
.rank-math-answer, .schema-faq-answer { margin: 0 0 12px; color: var(--lst-ink); }
.lst-content .rank-math-question::before, .lst-content .schema-faq-question::before { content: none; }

/* table of contents plugins */
.lst-content .wp-block-rank-math-toc-block, .lst-content #ez-toc-container, .lst-content .lwptoc {
  background: #fff; border: 1px solid var(--lst-line); border-radius: var(--lst-radius); padding: 18px 22px; box-shadow: none;
}
.lst-content .wp-block-rank-math-toc-block h2::before { display: none; }

/* ---------- Tool page: plugin theming ---------- */
.lsym-app {
  --lsym-bg: var(--lst-bg); --lsym-soft: var(--lst-petal); --lsym-line: var(--lst-line); --lsym-accent: var(--lst-rose); --lsym-ink: var(--lst-ink); --lsym-muted: var(--lst-muted);
  --lsym-font: var(--lst-body); --lsym-display: var(--lst-heading);
  --lsym-top: calc(var(--lst-header-h) + 16px);
}
.admin-bar .lsym-app { --lsym-top: calc(var(--lst-header-h) + 48px); }
.lst-content .lsym-app h3::before { display: none; }

/* ---------- Cards and archives ---------- */
.lst-archive { padding: clamp(28px, 5vw, 56px) 0 clamp(40px, 6vw, 80px); }
.lst-archive-head { max-width: var(--lst-content); margin-bottom: 24px; }
.lst-section-title { font-size: clamp(1.4rem, 1.2rem + 0.8vw, 1.8rem); margin: 0 0 18px; }
.lst-cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.lst-card { margin: 0; }
.lst-card-link { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--lst-line); border-radius: var(--lst-radius); overflow: hidden; text-decoration: none; color: var(--lst-ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.lst-card-link:hover { color: var(--lst-ink); border-color: #eab3c8; transform: translateY(-3px); box-shadow: 0 18px 36px -26px rgba(200, 64, 111, .55); }
.lst-card-img { display: block; aspect-ratio: 16 / 9; background: var(--lst-petal); }
.lst-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lst-card-img-empty { display: grid; place-items: center; font-size: 40px; color: var(--lst-rose); }
.lst-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 20px; }
.lst-card-title { font: 700 1.15rem/1.3 var(--lst-heading); letter-spacing: -0.01em; }
.lst-card-excerpt { font-size: 15px; color: var(--lst-muted); line-height: 1.55; }
.lst-related { padding: 8px 0 clamp(40px, 6vw, 72px); }

.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 32px; }
.nav-links .page-numbers { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid var(--lst-line); text-decoration: none; color: var(--lst-ink); font-weight: 700; }
.nav-links .page-numbers.current { background: var(--lst-rose); border-color: var(--lst-rose); color: #fff; }
.lst-single-foot { padding-bottom: 32px; }
.lst-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.lst-tags a { background: #fff; border: 1px solid var(--lst-line); border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--lst-ink); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; justify-content: stretch; }
.post-navigation a { display: block; height: 100%; background: #fff; border: 1px solid var(--lst-line); border-radius: 16px; padding: 14px 16px; text-decoration: none; color: var(--lst-ink); }
.post-navigation .nav-next { text-align: right; }
.lst-nav-label { display: block; font-size: 12px; font-weight: 700; color: var(--lst-muted); }
.lst-nav-title { display: block; font: 700 1rem/1.35 var(--lst-heading); }
@media (max-width: 600px) { .post-navigation .nav-links { grid-template-columns: 1fr; } .post-navigation .nav-next { text-align: left; } }

/* ---------- Search, 404, comments ---------- */
.lst-search { display: flex; gap: 8px; max-width: 520px; }
.lst-search input { flex: 1; min-width: 0; border: 1.5px solid var(--lst-line); background: #fff; border-radius: 999px; padding: 11px 18px; }
.lst-search input:focus { outline: none; border-color: var(--lst-rose); }
.lst-empty { background: #fff; border: 1px dashed var(--lst-line); border-radius: var(--lst-radius); padding: 28px; }
.lst-404 { text-align: center; padding: clamp(48px, 10vw, 120px) 0; }
.lst-404 .lst-search { margin: 20px auto; }
.lst-404-art { font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem); color: var(--lst-rose); margin: 0; }
.lst-comments { padding-bottom: 56px; }
.lst-comment-list { list-style: none; padding: 0; }
.lst-comment-list .comment-body { background: #fff; border: 1px solid var(--lst-line); border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; border: 1.5px solid var(--lst-line); border-radius: 14px; padding: 10px 14px; background: #fff; }

/* ---------- Footer ---------- */
.lst-footer { background: var(--lst-petal); border-top: 1px solid var(--lst-line); margin-top: 24px; }
.lst-footer-inner { width: min(100% - 2 * var(--lst-gutter), var(--lst-wide)); margin: 0 auto; padding: 40px 0 28px; display: grid; gap: 20px; grid-template-columns: 1fr; }
.lst-footer-desc { color: var(--lst-muted); margin: 10px 0 0; max-width: 42ch; font-size: 15px; }
.lst-footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.lst-footer-menu a { color: var(--lst-ink); text-decoration: none; font-weight: 600; font-size: 15px; }
.lst-footer-menu a:hover { color: var(--lst-rose); }
.lst-footer-copy { font-size: 14px; color: var(--lst-muted); border-top: 1px solid var(--lst-line); padding-top: 18px; }
.lst-footer-copy p { margin: 0; }
@media (min-width: 860px) {
  .lst-footer-inner { grid-template-columns: 1.2fr 2fr; align-items: start; }
  .lst-footer-nav { justify-self: end; }
  .lst-footer-copy { grid-column: 1 / -1; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
