/*
Theme Name: Answer Engine Daily
Theme URI: https://www.answerenginedaily.com
Author: Gunjan Jaswal
Author URI: https://www.gunjanjaswal.me
Description: Axios-style newsroom theme for Answer Engine Daily — an AEO/GEO + AI-search publication. Smart Brevity article layout, centered wordmark masthead, topic-pill navigation, light/dark mode, and an AI Tools custom post type.
Version: 1.0.31
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: answer-engine-daily
Tags: blog, news, two-columns, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, rtl-language-support, sticky-post, translation-ready
*/

/* Axios-style newsroom: centered wordmark + pill nav, topic-pill row, "Catch up quick" lead,
   divider-separated card grid, big centered article headline + Smart Brevity body. */
:root{
  --bg:#FFFFFF; --ink:#0B0B0C; --soft:#F3F4F6; --muted:#5B5F66; --line:#E6E7EA; --line2:#EDEEF1;
  --accent:#1356F0; --accent-ink:#0B3FC2;
  --c-aeo:#1356F0; --c-llms:#6A3BD0; --c-seo:#0E8A50; --c-tools:#DA6410; --c-reports:#C72E55;
  --sans:'Hanken Grotesk',-apple-system,system-ui,Segoe UI,sans-serif;
  --body:'Inter',-apple-system,system-ui,sans-serif;
  --wrap:1200px;
}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]){
  --bg:#0E0F12; --ink:#F2F3F5; --soft:#191B20; --muted:#9BA0A8; --line:#262A31; --line2:#20242B;
  --accent:#5B8CFF; --accent-ink:#9DB8FF;
  --c-aeo:#5B8CFF; --c-llms:#A989F0; --c-seo:#45C487; --c-tools:#EE9A4E; --c-reports:#F2698C; color-scheme:dark;
}}
:root[data-theme="dark"]{
  --bg:#0E0F12; --ink:#F2F3F5; --soft:#191B20; --muted:#9BA0A8; --line:#262A31; --line2:#20242B;
  --accent:#5B8CFF; --accent-ink:#9DB8FF;
  --c-aeo:#5B8CFF; --c-llms:#A989F0; --c-seo:#45C487; --c-tools:#EE9A4E; --c-reports:#F2698C; color-scheme:dark;
}
*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:var(--body);line-height:1.55;-webkit-font-smoothing:antialiased;margin:0}
a{color:inherit;text-decoration:none;cursor:pointer}
img,svg{display:block;max-width:100%}
h1,h2,h3,.hl{font-family:var(--sans)}
.wrap{max-width:var(--wrap);margin:0 auto;padding-inline:24px}
.cover{width:100%;aspect-ratio:16/9;border-radius:6px;background:var(--line);overflow:hidden}
.cover text{font-family:var(--sans)}
.cover img{width:100%;height:100%;object-fit:cover}

/* ---- masthead ---- */
.topline{height:4px;background:var(--accent)}
.mast{border-bottom:1px solid var(--line);background:var(--bg);position:sticky;top:env(safe-area-inset-top,0px);z-index:50;transition:transform .28s ease;will-change:transform}
.mast.hide{transform:translateY(-100%)}
.mast .row{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding-block:16px}
.pill{border:1.5px solid var(--ink);background:transparent;color:var(--ink);font-family:var(--sans);font-weight:700;font-size:14px;padding:8px 16px;border-radius:999px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.pill:hover{background:var(--ink);color:var(--bg)}
.pill.r{justify-self:end}
.mast .row>.pill:not(.r):not(.search){justify-self:start}
/* Theme toggle hidden for now (light mode forced in header.php). Remove this
   rule and the forced line in header.php to bring the light/dark toggle back. */
.pill[data-act="theme"]{display:none}
/* Header search: a magnifier on the right that slides open an input on click/focus. */
.mast .brand{grid-column:2}
.mast .row .pill.search{grid-column:3;justify-self:end;padding:0;gap:0;overflow:hidden;cursor:text;transition:background .15s}
.pill.search:hover{background:transparent;color:var(--ink)}
.search__btn{flex:0 0 auto;width:36px;height:36px;display:inline-flex;align-items:center;justify-content:center;color:var(--ink);cursor:pointer}
.pill.search input{order:-1;width:0;min-width:0;border:0;background:transparent;font-family:var(--sans);font-weight:700;font-size:14px;color:inherit;outline:none;padding:0;opacity:0;transition:width .28s ease,padding .28s ease,opacity .2s ease}
.pill.search input::placeholder{color:var(--muted)}
.pill.search:focus-within input{width:clamp(130px,24vw,210px);max-width:48vw;padding-left:14px;opacity:1}
.pill.search:focus-within{background:transparent}
/* While the field is open, drop the long wordmark so nothing overlaps or overflows. */
.pill.search:focus-within ~ .brand .wm{display:none}
.brand{justify-self:center;display:flex;align-items:center;gap:9px;cursor:pointer}
.brand .amark{width:26px;height:24px;color:var(--accent)}
.brand .wm{font-family:var(--sans);font-weight:900;font-size:24px;letter-spacing:-.03em;color:var(--ink);white-space:nowrap}
.aed{color:var(--accent);font-family:var(--sans);font-weight:900;font-size:24px;letter-spacing:-.02em;line-height:1}
.iconbtn{border:1.5px solid var(--line);background:transparent;color:var(--muted);width:34px;height:34px;border-radius:999px;cursor:pointer;font-size:14px;display:grid;place-items:center}
.iconbtn:hover{color:var(--ink);border-color:var(--ink)}
.topics{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;padding-bottom:14px}
.topic{display:inline-flex;align-items:center;gap:8px;padding:8px 15px;border-radius:999px;background:var(--soft);font-family:var(--sans);font-weight:700;font-size:14.5px;cursor:pointer;color:var(--ink);border:1px solid transparent}
.topic:hover{border-color:var(--line)}
.topic.active{background:var(--accent);color:#fff}
.topic.active .ic{color:#fff}
.topic .ic{width:17px;height:17px;color:var(--tc,var(--accent))}

/* ---- catch up / lead ---- */
.lead{display:grid;grid-template-columns:1fr 1.12fr;gap:42px;align-items:center;padding-block:40px 36px}
.ey{font-family:var(--sans);color:var(--muted);font-weight:600;font-size:16px;margin-bottom:14px;position:relative;padding-bottom:12px}
.ey::after{content:"";position:absolute;left:0;bottom:0;width:30px;height:2px;background:var(--muted);opacity:.6}
.lead h1{font-size:clamp(30px,4.3vw,50px);line-height:1.04;letter-spacing:-.03em;font-weight:800;margin:0 0 18px;text-wrap:balance}
.lead a:hover h1{color:var(--accent)}
.aed-byline{display:flex;align-items:center;gap:10px;color:var(--ink);font-family:var(--sans);font-weight:700;font-size:14px}
.aed-byline .av{width:30px;height:30px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:12px;font-weight:800;overflow:hidden}
.aed-byline .av img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.aed-byline .amark{width:16px;height:15px;color:var(--accent)}
.aed-byline .meta{color:var(--muted);font-weight:500}

/* ---- grids ---- */
.rowhead{display:flex;align-items:center;gap:14px;border-top:1px solid var(--ink);padding-top:14px;margin-top:8px}
.rowhead h2{font-size:15px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;margin:0}
.rowhead h2 a{color:inherit}
.rowhead h2 a:hover{color:var(--accent)}
.rowhead-link{margin-left:auto;font-family:var(--sans);font-weight:700;font-size:12.5px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);white-space:nowrap}
.rowhead-link:hover{color:var(--accent)}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;padding-block:26px 46px}
.card{padding:4px 24px;border-left:1px solid var(--line)}
.card:first-child{padding-left:0;border-left:0}
.card .cover{margin-bottom:13px}
.card .kx{font-family:var(--sans);font-weight:800;font-size:11px;letter-spacing:.07em;text-transform:uppercase;color:var(--kc,var(--accent));display:block;margin-bottom:6px}
.card h3{font-size:19px;line-height:1.18;letter-spacing:-.015em;font-weight:800;margin:0}
.card a:hover h3{color:var(--accent)}
.card .meta{color:var(--muted)}
.card .mt{color:var(--muted);font-family:var(--sans);font-weight:600;font-size:12.5px;margin-top:8px}

/* section page */
.phead{text-align:center;padding-block:40px 10px}
.phead .ic{width:30px;height:30px;color:var(--pc,var(--accent));margin:0 auto 10px}
.phead h1{font-size:clamp(32px,5vw,50px);letter-spacing:-.03em;font-weight:900;margin:0 0 10px}
.phead p{font-family:var(--body);font-size:17px;color:var(--muted);max-width:60ch;margin:0 auto;line-height:1.5}
.gridsec{display:grid;grid-template-columns:repeat(3,1fr);gap:34px 28px;padding-block:30px 56px}
.gridsec .card{border-left:0;padding:0}

/* tools */
.tools-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:22px;padding-block:28px 56px}
.toolcard{border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--bg);display:flex;flex-direction:column}
.toolcard .hd{height:92px;display:flex;align-items:center;gap:14px;padding:0 22px;color:#fff}
.toolcard .ic{width:48px;height:48px;border-radius:12px;background:rgba(255,255,255,.22);display:grid;place-items:center;font-family:var(--sans);font-weight:900;font-size:21px;overflow:hidden}
.toolcard .ic img{width:100%;height:100%;object-fit:cover;border-radius:12px}
.toolcard .hd h3{margin:0;font-size:22px;font-weight:900;letter-spacing:-.02em}
.toolcard .bd{padding:18px 22px 22px;display:flex;flex-direction:column;gap:12px;flex:1}
.toolcard .tag{font-family:var(--sans);font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.toolcard p{margin:0;font-size:15px;line-height:1.55;color:var(--ink);flex:1}
.btn{align-self:flex-start;background:var(--accent);color:#fff;border:0;font-family:var(--sans);font-weight:800;font-size:13.5px;padding:11px 18px;border-radius:999px;cursor:pointer}
.btn:hover{background:var(--accent-ink)}
.btn[disabled]{background:var(--soft);color:var(--muted);cursor:default}

/* ---- article (Smart Brevity) ---- */
.art{max-width:720px;margin:0 auto;padding-block:40px 20px;text-align:center}
.back{font-family:var(--sans);font-size:13px;font-weight:700;color:var(--muted);display:inline-block;margin-bottom:22px;text-transform:uppercase;letter-spacing:.05em}
.back:hover{color:var(--accent)}
.art h1{font-size:clamp(32px,5.3vw,52px);line-height:1.05;letter-spacing:-.035em;font-weight:800;margin:0 0 22px;text-wrap:balance}
.art .au{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:18px}
.art .au .av{width:34px;height:34px;border-radius:50%;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:800;font-size:13px;overflow:hidden}
.art .au .av img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.art .au .amark{width:17px;height:16px;color:var(--accent)}
.art .au .nm{font-family:var(--sans);font-weight:700;font-size:14.5px}
.art .au .dt{color:var(--muted);font-size:13px}
.share{display:flex;gap:9px;justify-content:center;align-items:center;margin-bottom:8px;flex-wrap:wrap}
.share .s{width:38px;height:38px;border-radius:50%;border:1.5px solid var(--line);display:grid;place-items:center;color:var(--muted);font-family:var(--sans);font-weight:800;font-size:13px}
.share .s:hover{border-color:var(--ink);color:var(--ink)}
.hero{max-width:1000px;margin:26px auto 0}
.hero .cover{border-radius:8px}
.hero .cap{font-family:var(--body);font-size:12.5px;color:var(--muted);margin-top:8px;text-align:left}
.body{max-width:680px;margin:30px auto 0;text-align:left;font-size:18.5px;line-height:1.7;overflow-wrap:break-word}
.body a{overflow-wrap:anywhere}
.body p{margin:0 0 1.15em}
.body p.lead-p{font-size:21px;line-height:1.5;font-weight:500}
.body strong{font-weight:700}
.body .lbl{font-family:var(--sans);font-weight:800}
.body a{color:var(--accent);text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1.5px}
.body ul{list-style:none;margin:0 0 1.2em;padding:0}
.body li{position:relative;padding-left:22px;margin:0 0 .55em}
.body li::before{content:"";position:absolute;left:2px;top:.6em;width:8px;height:8px;background:var(--accent);border-radius:2px}
.body h2{font-size:15px;font-weight:800;letter-spacing:.05em;text-transform:uppercase;margin:1.8em 0 .5em;color:var(--ink)}
.body h2 a,.body h3 a{color:inherit;font:inherit;text-decoration:none}
.body h2 a:hover,.body h3 a:hover{color:var(--accent)}
.godeep{max-width:680px;margin:6px auto 0;text-align:left;border-top:1px solid var(--line);padding-top:16px}
.godeep .l{font-family:var(--sans);font-weight:800;font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:8px}
.godeep a{display:block;color:var(--accent);font-size:15px;padding:3px 0;font-weight:600}
.related{max-width:var(--wrap);margin:40px auto 0}
.related .rowhead{margin-top:0}

footer.site-footer{border-top:1px solid var(--line);background:var(--bg);margin-top:30px}
footer.site-footer .wrap{padding-block:34px 48px;display:flex;flex-wrap:wrap;gap:28px;justify-content:space-between;align-items:flex-start}
footer.site-footer .fcol{display:flex;flex-direction:column;gap:9px}
footer.site-footer .fcol a{font-size:14px;color:var(--muted)}
footer.site-footer .fcol a:hover{color:var(--accent)}
footer.site-footer .fcol .h{font-family:var(--sans);font-weight:800;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink);margin-bottom:3px}
footer.site-footer .cr{font-size:13px;color:var(--muted);max-width:32ch}
footer.site-footer .fcopy-wrap{display:block;padding-block:0 32px}
footer.site-footer .fcopy{border-top:1px solid var(--line);padding-top:18px;font-size:12.5px;color:var(--muted);text-align:right}

/* ---- WordPress-specific additions ---- */
.aed-pagination{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;padding-block:10px 56px;font-family:var(--sans);font-weight:700;font-size:14px}
.aed-pagination .page-numbers{display:inline-grid;place-items:center;min-width:40px;height:40px;padding:0 12px;border:1.5px solid var(--line);border-radius:999px;color:var(--ink)}
.aed-pagination .page-numbers:hover{border-color:var(--ink)}
.aed-pagination .page-numbers.current{background:var(--accent);color:#fff;border-color:var(--accent)}
.aed-pagination .page-numbers.dots{border:0}

/* view all articles button */
.viewall{display:flex;justify-content:center;padding-block:4px 40px}
.btn-viewall{font-family:var(--sans);font-weight:800;font-size:14px;letter-spacing:-.01em;padding:13px 26px;border-radius:999px;border:1.5px solid var(--ink);color:var(--ink)}
.btn-viewall:hover{background:var(--ink);color:var(--bg)}

/* editor/block content inside the Smart Brevity body */
.body img{border-radius:6px;margin:0 0 1.15em}
.body figure{margin:0 0 1.2em}
.body figcaption{font-family:var(--body);font-size:12.5px;color:var(--muted);margin-top:6px}
.body blockquote{border-left:3px solid var(--accent);margin:0 0 1.2em;padding:2px 0 2px 18px;color:var(--muted);font-style:italic}
.body ol{margin:0 0 1.2em;padding-left:22px}
.body h3{font-size:22px;font-weight:800;letter-spacing:-.01em;margin:1.4em 0 .4em}
.body .alignwide{max-width:var(--wrap);margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw);padding-inline:24px}
.body .alignfull{max-width:100vw;margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}
.body .aligncenter{text-align:center}

/* page / generic content */
.page-body{max-width:none;margin:10px auto 0;text-align:left;font-size:18px;line-height:1.7;padding-block:10px 56px}
.page-body h2{font-size:26px;margin:1.3em 0 .4em}

/* comments (kept light) */
.comments-area{max-width:680px;margin:30px auto 0;padding-bottom:56px}
.comments-area .comment-list{list-style:none;padding:0;margin:0}
.comments-area .comment-body{border-top:1px solid var(--line);padding:16px 0}
.comments-area .comment-author{font-family:var(--sans);font-weight:700;font-size:14px}
.comments-area .comment-meta{color:var(--muted);font-size:12.5px;margin-bottom:6px}

/* author page */
.aed-author{margin-inline:auto}
.aed-author .av-lg{width:92px;height:92px;border-radius:50%;overflow:hidden;margin:0 auto 14px;background:var(--accent)}
.aed-author .av-lg img{width:100%;height:100%;object-fit:cover;display:block}
.aed-author-bio{font-family:var(--body);font-size:16px;color:var(--muted);line-height:1.65;text-align:left;margin:18px 0 0}
.aed-author-bio p{margin:0 0 .95em;max-width:none}
.aed-social{display:flex;gap:10px;justify-content:center;margin-top:16px}
.aed-social a{width:40px;height:40px;border-radius:50%;border:1.5px solid var(--line);display:grid;place-items:center;color:var(--muted)}
.aed-social a:hover{border-color:var(--ink);color:var(--ink)}
.aed-social svg{width:18px;height:18px;display:block}
.art .au .nm a{color:inherit}
.art .au .nm a:hover{color:var(--accent)}
.aed-byline a{color:inherit}
.aed-byline a:hover{color:var(--accent)}
.card .mt a{color:inherit}
.card .mt a:hover{color:var(--accent)}

.screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;padding:0;margin:-1px}
.skip-link{position:absolute;left:-9999px;top:0;background:var(--accent);color:#fff;padding:10px 16px;z-index:1000;font-family:var(--sans);font-weight:700}
.skip-link:focus{left:12px;top:12px}

@media(max-width:1000px){ .grid{grid-template-columns:repeat(2,1fr);gap:28px 24px} .card{border-left:0;padding:0} .gridsec{grid-template-columns:repeat(2,1fr)} }
@media(max-width:760px){
  .lead{grid-template-columns:1fr;gap:20px} .lead .media{order:-1}
  .mast .row{grid-template-columns:1fr auto 1fr} .brand .wm{font-size:20px}
  .pill span.t{display:none} .pill{padding:8px 11px}
}
@media(max-width:560px){ .grid{grid-template-columns:1fr} .gridsec{grid-template-columns:1fr} }
@media(max-width:600px){
  footer.site-footer .wrap{flex-direction:column;gap:26px;padding-block:30px 32px}
  footer.site-footer .fcopy{text-align:left}
}
/* On narrow phones the wordmark would wrap to two lines — show the AED mark only. */
@media(max-width:500px){ .brand .wm{display:none} }
