/* Shared styles for the text tools: Character Counter, Words to Minutes, Words to Pages.
   Uses the site palette (cream / brown / #b5541c accent). Scoped under .tt-page. */
.tt-page {
  --tt-ink: #2b1f14;
  --tt-muted: #6b5a48;
  --tt-accent: #b5541c;
  --tt-accent-dark: #9a4515;
  --tt-accent-pale: #fbf3ea;
  --tt-line: #ead9c6;
  --tt-card: #fffdf8;
  --tt-ok: #1e7e34;
  --tt-ok-bg: #e6f4ea;
  --tt-warn: #a86400;
  --tt-warn-bg: #fff4dc;
  --tt-bad: #b42318;
  --tt-bad-bg: #fde8e6;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--tt-ink);
  max-width: 1080px;
  margin: 0 auto;
  padding: 110px 16px 40px;
}
.tt-page *, .tt-page *::before, .tt-page *::after { box-sizing: border-box; }
.tt-page [hidden] { display: none !important; }

/* Breadcrumb */
.tt-crumb ol { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; font-size: .88rem; color: var(--tt-muted); }
.tt-crumb li + li::before { content: "\203A"; margin: 0 8px; }
.tt-crumb a { color: var(--tt-accent-dark); font-weight: 600; text-decoration: none; }
.tt-crumb a:hover { text-decoration: underline; }

/* Hero */
.tt-hero { text-align: center; margin-bottom: 26px; }
.tt-label { display: inline-block; background: #f0c9b8; color: var(--tt-accent-dark); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .3rem .85rem; border-radius: 100px; margin-bottom: 12px; }
.tt-hero h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin: 0; }
.tt-hero p { margin: 10px auto 0; max-width: 680px; color: var(--tt-muted); font-size: 1.02rem; line-height: 1.6; }

/* Tool card */
.tt-card { background: var(--tt-card); border: 1px solid var(--tt-line); border-radius: 18px; padding: 22px; box-shadow: 0 10px 30px rgba(43, 31, 20, .07); }
.tt-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 14px; }
.tt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 180px; }
.tt-field label { font-size: .85rem; font-weight: 700; color: var(--tt-muted); }
.tt-field select, .tt-field input { width: 100%; padding: 10px 12px; border: 1px solid var(--tt-line); border-radius: 10px; background: #fff; font: inherit; color: var(--tt-ink); }
.tt-field select:focus, .tt-field input:focus, .tt-textarea:focus { outline: 2px solid var(--tt-accent); outline-offset: 1px; }
.tt-textarea { width: 100%; min-height: 220px; resize: vertical; padding: 14px 16px; border: 1px solid var(--tt-line); border-radius: 12px; font: inherit; font-size: 1rem; line-height: 1.6; color: var(--tt-ink); background: #fff; }
.tt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.tt-btn { border: 0; cursor: pointer; padding: 10px 18px; border-radius: 50px; font: inherit; font-weight: 700; background: var(--tt-accent); color: #fff; }
.tt-btn:hover { background: var(--tt-accent-dark); }
.tt-btn.ghost { background: transparent; color: var(--tt-accent-dark); border: 1px solid var(--tt-line); }

/* Limit meter */
.tt-meter { margin-top: 14px; }
.tt-meter-bar { height: 10px; border-radius: 10px; background: #f1e6d8; overflow: hidden; }
.tt-meter-fill { height: 100%; width: 0; background: var(--tt-ok); transition: width .15s ease, background .15s ease; }
.tt-meter-text { margin-top: 8px; font-weight: 700; font-size: .95rem; padding: 8px 12px; border-radius: 10px; background: var(--tt-ok-bg); color: var(--tt-ok); }
.tt-meter.warn .tt-meter-fill { background: var(--tt-warn); }
.tt-meter.warn .tt-meter-text { background: var(--tt-warn-bg); color: var(--tt-warn); }
.tt-meter.over .tt-meter-fill { background: var(--tt-bad); }
.tt-meter.over .tt-meter-text { background: var(--tt-bad-bg); color: var(--tt-bad); }

/* Stats */
.tt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.tt-stat { background: var(--tt-accent-pale); border: 1px solid var(--tt-line); border-radius: 12px; padding: 12px 14px; text-align: center; }
.tt-stat b { display: block; font-size: 1.55rem; font-weight: 800; line-height: 1.2; }
.tt-stat span { font-size: .82rem; color: var(--tt-muted); font-weight: 600; }
.tt-big { text-align: center; margin-top: 16px; padding: 18px; border-radius: 14px; background: var(--tt-accent-pale); border: 1px solid var(--tt-line); }
.tt-big b { display: block; font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; color: var(--tt-accent-dark); }
.tt-big span { color: var(--tt-muted); font-weight: 600; }

/* Platform grid (all limits at once) */
.tt-platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin-top: 16px; }
.tt-plat { border: 1px solid var(--tt-line); border-radius: 12px; padding: 10px 12px; background: #fff; font-size: .9rem; }
.tt-plat strong { display: block; font-size: .92rem; }
.tt-plat em { font-style: normal; font-weight: 700; }
.tt-plat.ok em { color: var(--tt-ok); }
.tt-plat.over em { color: var(--tt-bad); }

/* Article content */
.tt-content { margin-top: 44px; line-height: 1.75; font-size: 1.02rem; }
.tt-content h2 { font-size: clamp(1.35rem, 3.4vw, 1.8rem); font-weight: 800; margin: 38px 0 12px; letter-spacing: -.02em; }
.tt-content h3 { font-size: 1.15rem; font-weight: 700; margin: 24px 0 8px; }
.tt-content p, .tt-content ul, .tt-content ol { margin: 0 0 14px; }
.tt-content ul, .tt-content ol { padding-left: 22px; }
.tt-content a { color: #0b66c3; text-decoration: underline; }
.tt-content a:hover { color: #084c91; }
.tt-table-wrap { overflow-x: auto; margin: 14px 0 18px; border: 1px solid var(--tt-line); border-radius: 12px; }
.tt-table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 480px; background: #fff; }
.tt-table th, .tt-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--tt-line); }
.tt-table th { background: var(--tt-accent-pale); font-weight: 700; }
.tt-table tr:last-child td { border-bottom: 0; }

/* FAQ (class names are read by components/schema.php for FAQPage) */
.tt-faq { margin-top: 10px; }
.tt-faq .faq-item { border: 1px solid var(--tt-line); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.tt-faq .faq-q { cursor: pointer; padding: 14px 16px; font-weight: 700; list-style: none; }
.tt-faq .faq-q::-webkit-details-marker { display: none; }
.tt-faq .faq-q::after { content: "+"; float: right; color: var(--tt-accent); font-weight: 800; }
.tt-faq details[open] .faq-q::after { content: "\2212"; }
.tt-faq .faq-a { padding: 0 16px 14px; color: #3d2f22; }

/* Related tools + guides */
.tt-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.tt-link-card { display: block; padding: 14px 16px; border: 1px solid var(--tt-line); border-radius: 12px; background: #fff; text-decoration: none !important; color: var(--tt-ink) !important; transition: transform .2s ease, box-shadow .2s ease; }
.tt-link-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(43, 31, 20, .08); }
.tt-link-card strong { display: block; color: var(--tt-accent-dark); }
.tt-link-card span { font-size: .9rem; color: var(--tt-muted); }
.tt-guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 14px; }
.tt-guide { border: 1px solid var(--tt-line); border-radius: 14px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.tt-guide img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: #f1e6d8; }
.tt-guide div { padding: 14px 16px; }
.tt-guide h3 { margin: 0 0 6px; font-size: 1.02rem; line-height: 1.4; }
.tt-guide h3 a { color: var(--tt-ink); text-decoration: none; }
.tt-guide h3 a:hover { text-decoration: underline; }
.tt-guide p { margin: 0; font-size: .9rem; color: var(--tt-muted); line-height: 1.55; }

/* Blog sections — same design as the "Latest Blogs" block on the other tool pages */
.tt-blogs { padding: 56px 0 10px; text-align: center; }
.tt-blogs .section-label { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tt-accent); margin-bottom: 10px; display: inline-flex; padding: 6px 18px; border-radius: 100px; background: rgba(181, 84, 28, .10); border: 1px solid rgba(181, 84, 28, .25); }
.tt-blogs .section-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; margin: 0 0 12px; letter-spacing: -.02em; color: var(--tt-ink); }
.tt-blogs .section-sub { color: var(--tt-muted); max-width: 520px; line-height: 1.7; margin: 0 auto 36px; font-size: .95rem; }
.latest-blogs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 10px; }
.latest-blog-card { background: #fffdf8; border: 1px solid var(--tt-line); border-radius: 18px; overflow: hidden; transition: all .35s ease; display: flex; flex-direction: column; text-align: left; box-shadow: 0 4px 16px rgba(60, 40, 20, .06); }
.latest-blog-card:hover { transform: translateY(-6px); border-color: var(--tt-accent); box-shadow: 0 16px 50px rgba(60, 40, 20, .12); }
.latest-blog-image-wrap { display: block; width: 100%; height: 200px; overflow: hidden; background: #f1e6d8; }
.latest-blog-image { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; display: block; }
.latest-blog-card:hover .latest-blog-image { transform: scale(1.06); }
.latest-blog-content { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.latest-blog-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; font-size: .78rem; color: var(--tt-accent); font-weight: 600; }
.latest-blog-meta a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.latest-blog-title { margin: 0 0 10px; line-height: 1.4; }
.latest-blog-title a { color: var(--tt-ink); text-decoration: none; font-size: 1.05rem; font-weight: 700; transition: color .3s ease; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.latest-blog-title a:hover { color: var(--tt-accent); }
.latest-blog-desc { color: var(--tt-muted); font-size: .88rem; line-height: 1.6; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.latest-blog-btn { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--tt-accent); font-weight: 700; font-size: .9rem; text-decoration: none; transition: gap .3s ease; }
.latest-blog-btn:hover { gap: 12px; }
.tt-view-all { display: inline-flex; align-items: center; gap: 8px; margin-top: 34px; padding: 13px 28px; border-radius: 50px; background: var(--tt-accent); color: #fff !important; font-weight: 700; text-decoration: none; transition: background .25s ease, transform .25s ease; }
.tt-view-all:hover { background: var(--tt-accent-dark); transform: translateY(-2px); }

/* Content helpers */
.tt-tip { margin: 18px 0; padding: 14px 18px; border-left: 4px solid var(--tt-accent); background: var(--tt-accent-pale); border-radius: 10px; }
.tt-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 14px 0 18px; }
.tt-box { border: 1px solid var(--tt-line); border-radius: 14px; padding: 16px 18px; background: #fff; }
.tt-box h3 { margin-top: 0; }
.tt-box p:last-child { margin-bottom: 0; }

@media (max-width: 960px) {
  .latest-blogs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .latest-blogs-grid, .tt-grid2 { grid-template-columns: 1fr; }
  .latest-blog-image-wrap { height: 210px; }
  .tt-blogs { padding-top: 40px; }
  .tt-content { font-size: 1rem; }
}

.tt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
  .tt-page { padding-top: 96px; }
  .tt-card { padding: 16px; }
}
