/*
 * AfriWidget homepage brand layer.
 *
 * The site is intentionally static, so this stylesheet is linked in each
 * page's head. It keeps older tool pages visually aligned with the homepage
 * without changing their functionality.
 */
:root {
  --afri-ink: #0f172a;
  --afri-ink-soft: #1e293b;
  --afri-yellow: #facc15;
  --afri-yellow-soft: #fef3c7;
  --afri-yellow-dark: #a16207;
  --afri-paper: #f8fafc;
}

/*
 * Mobile overflow safety for generated values and legacy tool layouts.
 * Static calculators can produce long numbers, URLs, JSON, XML, passwords,
 * and identifiers that do not contain natural word breaks.
 */
html {
  max-width: 100%;
  overflow-x: clip;
}

body {
  max-width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  flex-grow: 1;
}

footer {
  margin-top: auto;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

main,
header,
section,
article,
form,
nav,
footer,
.grid > *,
.flex > * {
  min-width: 0;
}

img,
video,
canvas,
iframe {
  max-width: 100%;
}

/* Fail-safe SVG sizing & display resets */
svg {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  flex-shrink: 0;
}

svg:not([width]):not([class*="w-"]):not([class*="h-"]) {
  width: 1.5rem;
  height: 1.5rem;
}

svg.w-3, svg.h-3, svg[class*="w-3"], svg[class*="h-3"] { width: 0.75rem; height: 0.75rem; }
svg.w-3\.5, svg.h-3\.5, svg[class*="w-3.5"], svg[class*="h-3.5"] { width: 0.875rem; height: 0.875rem; }
svg.w-4, svg.h-4, svg[class*="w-4"], svg[class*="h-4"] { width: 1rem; height: 1rem; }
svg.w-5, svg.h-5, svg[class*="w-5"], svg[class*="h-5"] { width: 1.25rem; height: 1.25rem; }
svg.w-6, svg.h-6, svg[class*="w-6"], svg[class*="h-6"] { width: 1.5rem; height: 1.5rem; }
svg.w-7, svg.h-7, svg[class*="w-7"], svg[class*="h-7"] { width: 1.75rem; height: 1.75rem; }
svg.w-8, svg.h-8, svg[class*="w-8"], svg[class*="h-8"] { width: 2rem; height: 2rem; }
svg.w-10, svg.h-10, svg[class*="w-10"], svg[class*="h-10"] { width: 2.5rem; height: 2.5rem; }
svg.w-12, svg.h-12, svg[class*="w-12"], svg[class*="h-12"] { width: 3rem; height: 3rem; }
svg.w-16, svg.h-16, svg[class*="w-16"], svg[class*="h-16"] { width: 4rem; height: 4rem; }
svg.w-20, svg.h-20, svg[class*="w-20"], svg[class*="h-20"] { width: 5rem; height: 5rem; }

/* Sticky navigation clean zero-flicker positioning */
nav.sticky, nav[class*="sticky"] {
  position: sticky;
  top: 0;
  z-index: 50;
  contain: paint;
}

/* Tab button & Segmented control layout fail-safe */
.tab-btn, [role="tab"], .tab-item {
  flex-shrink: 0 !important;
}
[role="tablist"] {
  width: 100%;
}

/* Navigation & Header Fail-safe Styling */
header {
  color: #f8fafc;
}

header a, nav a {
  color: #cbd5e1;
  text-decoration: none;
}

header a:hover, nav a:hover {
  color: #facc15;
}

/* Brand Wordmark Styling */
nav a span.font-extrabold,
header a span.font-extrabold,
.site-brand-wordmark {
  color: #ffffff !important;
}

nav a span.font-extrabold span,
header a span.font-extrabold span,
.site-brand-wordmark span,
.afriwidget-home-wordmark {
  color: #fde047 !important; /* Yellow-300 */
}

/* Mobile Navigation Drawer Fail-safe Reset - Hidden by default to prevent FOUC / flashing */
.mobile-menu {
  display: none !important;
}

.mobile-menu.open {
  display: block !important;
}

@media (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
}

/* Navigation Dropdown Fail-safe Styling */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  display: block;
}

/* Core Structural Layout Helpers */
.flex { display: flex; }
.hidden { display: none; }
.block { display: block; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

@media (min-width: 768px) {
  .md\:flex { display: flex !important; }
  .md\:hidden { display: none !important; }
}

input,
select,
textarea,
button {
  max-width: 100%;
}

pre,
code,
output,
[role="status"],
[aria-live="polite"],
[aria-live="assertive"] {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

pre {
  white-space: pre-wrap;
  overflow-x: hidden;
}

pre.overflow-x-auto,
pre.overflow-x-scroll {
  white-space: pre-wrap !important;
  overflow-x: hidden !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}

table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

th,
td {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/*
 * Tailwind utility combinations such as flex/grid cards can otherwise keep
 * their intrinsic width when a generated result is inserted.
 */
[id*="result"],
[id*="Result"],
[id*="output"],
[id*="Output"],
[class*="result"],
[class*="output"] {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/*
 * nav.js inserts the shared Back bar on non-home pages. Keep the control
 * invisible until the script has finished normalizing the page so it never
 * flashes in after the first paint or appears beside a hero badge.
 */
.afriwidget-back-bar {
  width: 100%;
  background: #0f172a;
  border-top: 1px solid rgba(148, 163, 184, .12);
  border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.afriwidget-back-bar-inner {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: .55rem 1rem;
}

.afriwidget-back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  width: max-content;
  margin: 0;
  visibility: hidden;
  padding: .35rem .55rem;
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, .34);
  border-radius: .5rem;
  box-shadow: none;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.afriwidget-back-link:hover {
  background: rgba(148, 163, 184, .12);
  color: #f8fafc;
  border-color: rgba(203, 213, 225, .62);
}

.afriwidget-back-link:focus-visible {
  outline: 2px solid rgba(250, 204, 21, .72);
  outline-offset: 2px;
  border-radius: .5rem;
}

.afriwidget-back-link svg {
  width: .9rem;
  height: .9rem;
  flex: none;
  stroke-width: 2;
}

.afriwidget-back-link.afriwidget-back-link-ready {
  visibility: visible;
}

body {
  background-color: #f8fafc;
}

body.bg-slate-950,
body[class*="bg-slate-950"] {
  background-color: #020617;
}

/*
 * New homepage-branded generators use the same light content surface as the
 * rest of the internal tool pages. Their navigation, hero, and footer keep
 * the shared AfriWidget dark/gold branding.
 */
body.light-generator:not(.home-layout) {
  background: var(--afri-paper) !important;
  color: #1e293b;
}

body.light-generator main .bg-slate-900 {
  background-color: #ffffff !important;
}

body.light-generator main .bg-slate-950 {
  background-color: #f1f5f9 !important;
}

body.light-generator main .bg-slate-800 {
  background-color: #ffffff !important;
}

body.light-generator main .border-slate-700,
body.light-generator main .border-slate-600 {
  border-color: #cbd5e1 !important;
}

body.light-generator main .text-slate-100,
body.light-generator main .text-slate-200,
body.light-generator main .text-slate-300,
body.light-generator main .text-slate-400 {
  color: #475569 !important;
}

body.light-generator main .text-white {
  color: #0f172a !important;
}

body.light-generator main .text-yellow-100 {
  color: #713f12 !important;
}

body.light-generator main .text-yellow-300 {
  color: #a16207 !important;
}

/*
 * Long-form guides are raw HTML by design, so give them a real reading
 * surface without depending on the optional Tailwind typography plugin.
 */
body.light-generator main article,
body.light-generator main > section:last-child {
  margin-top: 3rem;
  padding: 2rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  color: #334155 !important;
  line-height: 1.8;
}

body.light-generator main article h2,
body.light-generator main article h3,
body.light-generator main > section:last-child h2 {
  margin-top: 0;
  color: #0f172a !important;
  line-height: 1.25;
}

body.light-generator main article h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

body.light-generator main article p,
body.light-generator main > section:last-child p {
  margin-top: 1rem;
  color: #475569 !important;
}

body.light-generator main article ul,
body.light-generator main article ol {
  margin: 1rem 0;
  padding-left: 1.4rem;
  color: #475569 !important;
}

body.light-generator main article li + li {
  margin-top: .55rem;
}

body.light-generator main article details {
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
}

body.light-generator main article details summary,
body.light-generator main article details p {
  color: #1e293b !important;
}

/*
 * The career-writing pages are intentionally compressed static HTML. Use the
 * article marker as a second hook so their light treatment remains active even
 * when a page's body class is edited or minified differently.
 */
/* Modern Article & Content Styling (High Performance Selectors) */
body.homepage-branding main article.prose,
body.homepage-branding .guide-content {
  background: var(--afri-paper) !important;
  color: #1e293b;
}

body.homepage-branding main article.prose .bg-slate-900,
body.homepage-branding .guide-content .bg-slate-900 {
  background-color: #ffffff !important;
}

body.homepage-branding main article.prose .bg-slate-950,
body.homepage-branding .guide-content .bg-slate-950 {
  background-color: #f1f5f9 !important;
}

body.homepage-branding main article.prose .bg-slate-800,
body.homepage-branding .guide-content .bg-slate-800 {
  background-color: #ffffff !important;
}

body.homepage-branding main article.prose .border-slate-700,
body.homepage-branding main article.prose .border-slate-600,
body.homepage-branding .guide-content .border-slate-700,
body.homepage-branding .guide-content .border-slate-600 {
  border-color: #cbd5e1 !important;
}

body.homepage-branding main article.prose .text-slate-100,
body.homepage-branding main article.prose .text-slate-200,
body.homepage-branding main article.prose .text-slate-300,
body.homepage-branding main article.prose .text-slate-400,
body.homepage-branding .guide-content .text-slate-300,
body.homepage-branding .guide-content .text-slate-400 {
  color: #475569 !important;
}

body.homepage-branding main article.prose .text-white,
body.homepage-branding .guide-content .text-white {
  color: #0f172a !important;
}

body.homepage-branding main article {
  margin-top: 3rem;
  padding: 2rem 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 1.5rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
  color: #334155 !important;
  line-height: 1.8;
}

body.homepage-branding main article h2,
body.homepage-branding main article h3 {
  color: #0f172a !important;
  line-height: 1.25;
}

body.homepage-branding main article h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

body.homepage-branding main article p {
  margin-top: 1rem;
  color: #475569 !important;
}

body.homepage-branding main article ul,
body.homepage-branding main article ol {
  margin: 1rem 0;
  padding-left: 1.4rem;
  color: #475569 !important;
}

body.homepage-branding main article details {
  border-color: #e2e8f0 !important;
  background: #f8fafc !important;
}

body.homepage-branding main article details summary,
body.homepage-branding main article details p {
  color: #1e293b !important;
}

@media (min-width: 640px) {
  body.light-generator main article,
  body.light-generator main > section:last-child,
  body.homepage-branding main article {
    padding: 2.5rem 3rem;
  }
}

/* Ad Layout & Zero-Gap CLS Stability: Never reserve large empty whitespace when ads are unfilled */
ins.adsbygoogle {
  display: block;
  text-align: center;
  margin: 0 auto;
}

ins.adsbygoogle:empty,
ins.adsbygoogle[data-ad-status="unfilled"],
ins.adsbygoogle:not([data-ad-status="filled"]) {
  display: none !important;
  min-height: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

ins.adsbygoogle[data-ad-status="filled"] {
  display: block !important;
  min-height: 90px;
}

#cookieBanner {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 9999 !important;
}

/* ==========================================================================
   AI Writing Tools & Form Field Standards (AfriWidget Design System)
   ========================================================================== */

form[data-writing-tool] label,
.writing-tool-card label {
  display: block;
  width: 100%;
}

.writing-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.4rem;
  line-height: 1.25;
}

.writing-input {
  display: block;
  width: 100%;
  border: 2px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.writing-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.writing-input:focus {
  border-color: #facc15 !important;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25) !important;
}

select.writing-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25em 1.25em;
  padding-right: 2.5rem;
  cursor: pointer;
}

textarea.writing-input {
  min-height: 6rem;
  resize: vertical;
}

.writing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #facc15 !important;
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 1rem;
  padding: 0.8rem 1.4rem;
  border-radius: 0.75rem;
  border: 1px solid #facc15 !important;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(250, 204, 21, 0.25);
  transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.writing-button:hover {
  background-color: #fde047 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(250, 204, 21, 0.35);
}

.writing-button:active {
  transform: translateY(0);
}

.writing-button.text-sm {
  font-size: 0.875rem !important;
  padding: 0.5rem 1rem !important;
}

.writing-output {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  min-height: 120px;
}

.profile-image-preview {
  display: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  object-fit: cover;
  border: 3px solid #facc15;
}

.profile-image-preview.visible {
  display: inline-block;
}

/* Resume Builder Paper Preview */
.resume-preview-shell {
  background: #ffffff;
  min-height: 480px;
  padding: 2rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.resume-preview-empty {
  color: #64748b;
  font-style: italic;
  padding: 3rem 1rem;
  text-align: center;
}

.resume-paper {
  background: #ffffff;
  color: #1e293b;
  font-size: 0.925rem;
  line-height: 1.6;
}

.resume-paper-header {
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.resume-paper-header h3 {
  font-size: 1.65rem;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.resume-paper-header p {
  color: #475569;
  font-weight: 700;
  font-size: 1.05rem;
  margin-top: 0.25rem;
}

.resume-paper-contact {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.resume-section {
  margin-bottom: 1.5rem;
}

.resume-section h4 {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f766e;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}

.resume-section-copy {
  color: #334155;
}

.resume-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.resume-skill-list span {
  background: #f1f5f9;
  color: #334155;
  padding: 0.25rem 0.65rem;
  border-radius: 0.4rem;
  font-size: 0.825rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

.resume-entry {
  margin-bottom: 0.85rem;
}

/* Ensure smooth, flicker-free rendering and instantaneous 60fps scrolling */
html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Fail-Safe Universal Form Inputs, Textareas, Controls & Tool Styles
   ========================================================================== */

/* Keyword Density Checker classes */
.density-input {
  display: block;
  width: 100%;
  border: 2px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  background-color: #f8fafc;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.6;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.density-input:focus {
  border-color: #facc15;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

.density-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.density-table th {
  background-color: #f8fafc;
  padding: 0.75rem 1rem;
  font-weight: 700;
  color: #0f172a;
  border-bottom: 2px solid #e2e8f0;
}

.density-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.density-table tr:hover td {
  background-color: #f8fafc;
}

/* AI Writing Toolkit Classes */
.writing-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.writing-input {
  display: block;
  width: 100%;
  border: 2px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.writing-input:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

.writing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  border-radius: 0.75rem;
  background-color: #facc15;
  color: #0f172a;
  padding: 0.75rem 1.25rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.writing-button:hover {
  background-color: #fde047;
}

.writing-button:active {
  transform: scale(0.98);
}

.writing-output {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* URL Slug Generator classes */
.slug-input {
  display: block;
  width: 100%;
  border: 2px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: #ffffff;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.slug-input:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

.slug-output {
  word-break: break-all;
}

/* Meta Pixel Checker & XML Sitemap Builder dark tool shell classes */
.tool-shell {
  background-color: #0f172a;
  border: 1px solid #1e293b;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.control {
  display: block;
  width: 100%;
  border: 2px solid #334155;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  background-color: #1e293b;
  color: #f8fafc;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.control:focus {
  border-color: #facc15;
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.25);
}

.control::placeholder {
  color: #64748b;
}

.meter {
  height: 6px;
  background-color: #334155;
  border-radius: 999px;
  overflow: hidden;
}

.meter > span {
  display: block;
  height: 100%;
  width: 0%;
  background-color: #10b981;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.meter > span.warning {
  background-color: #f59e0b;
}

.meter > span.danger {
  background-color: #ef4444;
}

.serp-url {
  color: #475569;
}

.serp-title {
  color: #1a0dab;
  font-weight: 500;
}

.serp-title:hover {
  text-decoration: underline;
}

.serp-copy {
  color: #4d5156;
}

.code-output {
  white-space: pre-wrap;
  word-break: break-all;
  overflow-x: auto;
}

/* ==========================================================================
   Comprehensive Educational Guides & Professional FAQ Styling
   ========================================================================== */

#toolGuide,
.guide-content,
.new-tool-page .guide,
article.prose {
  color: #1e293b;
  line-height: 1.75;
}

#toolGuide h2,
.guide-content h2,
.new-tool-page .guide h2,
article.prose h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

#toolGuide h3,
.guide-content h3,
.new-tool-page .guide h3,
article.prose h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

#toolGuide p,
.guide-content p,
.new-tool-page .guide p,
article.prose p {
  color: #334155;
  margin: 0.75rem 0;
  font-size: 0.965rem;
  line-height: 1.7;
}

#toolGuide ul,
#toolGuide ol,
.guide-content ul,
.guide-content ol,
.new-tool-page .guide ul,
.new-tool-page .guide ol,
article.prose ul,
article.prose ol {
  margin: 0.85rem 0 1.25rem;
  padding-left: 1.4rem;
  color: #334155;
  line-height: 1.7;
}

#toolGuide li,
.guide-content li,
.new-tool-page .guide li,
article.prose li {
  margin: 0.4rem 0;
  font-size: 0.965rem;
}

#toolGuide strong,
#toolGuide b,
.guide-content strong,
.guide-content b,
.new-tool-page .guide strong,
.new-tool-page .guide b,
article.prose strong,
article.prose b {
  color: #0f172a;
  font-weight: 700;
}

#toolGuide blockquote,
.guide-content blockquote,
.new-tool-page .guide blockquote,
article.prose blockquote {
  border-left: 4px solid #facc15;
  background: #fffbeb;
  color: #78350f;
  padding: 0.85rem 1.15rem;
  border-radius: 0 0.65rem 0.65rem 0;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}

/* Modern Professional FAQ Accordions */
#toolGuide details,
.guide-content details,
.new-tool-page .guide details,
article details {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  margin-bottom: 0.85rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

#toolGuide details:hover,
.guide-content details:hover,
.new-tool-page .guide details:hover,
article details:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

#toolGuide details[open],
.guide-content details[open],
.new-tool-page .guide details[open],
article details[open] {
  border-color: #facc15;
  box-shadow: 0 6px 18px rgba(250, 204, 21, 0.12);
}

#toolGuide details summary,
.guide-content details summary,
.new-tool-page .guide details summary,
article details summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.35rem;
  font-weight: 700;
  font-size: 1rem;
  color: #0f172a;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#toolGuide details summary::-webkit-details-marker,
.guide-content details summary::-webkit-details-marker,
.new-tool-page .guide details summary::-webkit-details-marker,
article details summary::-webkit-details-marker {
  display: none;
}

#toolGuide details summary::after,
.guide-content details summary::after,
.new-tool-page .guide details summary::after,
article details summary::after {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2.5px solid #64748b;
  border-bottom: 2.5px solid #64748b;
  transform: rotate(45deg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  margin-left: 1rem;
  flex-shrink: 0;
}

#toolGuide details[open] summary,
.guide-content details[open] summary,
.new-tool-page .guide details[open] summary,
article details[open] summary {
  background: #fffbeb;
  color: #78350f;
  border-bottom: 1px solid #fef3c7;
}

#toolGuide details[open] summary::after,
.guide-content details[open] summary::after,
.new-tool-page .guide details[open] summary::after,
article details[open] summary::after {
  transform: rotate(-135deg);
  border-color: #b45309;
}

#toolGuide details div,
.guide-content details div,
.new-tool-page .guide details div,
article details div {
  padding: 1.2rem 1.35rem 1.35rem;
  background: #ffffff;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.7;
}

#toolGuide details div p:first-child,
.guide-content details div p:first-child,
.new-tool-page .guide details div p:first-child,
article details div p:first-child {
  margin-top: 0;
}

#toolGuide details div p:last-child,
.guide-content details div p:last-child,
.new-tool-page .guide details div p:last-child,
article details div p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Responsive AI Assistant & Share Result Interface (TV, PC, Tablet, Mobile)
   ========================================================================== */

#ai-live-insight {
  width: 100%;
  max-width: 80rem; /* max-w-7xl */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

#ai-live-insight #universalAiInsight {
  word-break: break-word;
  overflow-wrap: break-word;
}

#universalAiQuickChips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ai-quick-chip {
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  user-select: none;
}

.ai-quick-chip:hover {
  transform: translateY(-1px);
}

.ai-quick-chip:active {
  transform: translateY(0);
}

#shareResultBar {
  width: 100%;
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

#shareResultBar button {
  min-height: 44px;
}

/* Large TV & 4K Ultra-wide Display Enhancements */
@media (min-width: 1536px) {
  #ai-live-insight {
    padding: 2.5rem;
    border-radius: 1.75rem;
  }

  #ai-live-insight #universalAiInsight {
    font-size: 1.125rem;
    line-height: 1.8;
  }

  #shareResultBar {
    padding: 1.75rem 2.25rem;
  }
}

@media (min-width: 1920px) {
  #ai-live-insight,
  #shareResultBar {
    max-width: 88rem;
  }
}

/* Share Modal Smooth Transitions */
#afriwidgetShareModal {
  animation: modalBackdropFade 0.2s ease-out;
}

#afriwidgetShareModal > div {
  animation: modalContentZoom 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalBackdropFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalContentZoom {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Universal Mobile & Multi-Device Responsiveness Safeguards */
@media (max-width: 639px) {
  /* Prevent horizontal scroll from long single words, badges, or codes */
  h1, h2, h3, h4, h5, h6, p, span, a, label {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Form & Interactive elements mobile responsiveness */
  input[type="text"],
  input[type="search"],
  input[type="number"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  select,
  textarea {
    font-size: 16px !important; /* Prevents iOS Safari auto-zoom on input focus */
    max-width: 100%;
  }

  /* Quick chip container wrapping */
  .quick-chip {
    white-space: nowrap;
    max-width: 100%;
    text-overflow: ellipsis;
  }

  /* Search ring mobile safe boundaries */
  .search-ring {
    width: 100%;
    max-width: 100%;
  }
}

/* Fluid responsive container constraints */
.tool-card,
.app-card {
  min-width: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .tool-card:hover,
  .app-card:hover {
    transform: translateY(-2px);
  }
}




