/*
Theme Name: Boards (GeneratePress Child)
Description: Child theme for the Boards study site. Navy, white and gold look with quiz, prompt and question blocks.
Author: Haripria.AI
Template: generatepress
Version: 1.0.1
Text Domain: boards-child
*/

/* ---------- Tokens ---------- */
:root{
  --bd-ground:#F6F7F9;--bd-surface:#FFFFFF;--bd-ink:#101B33;--bd-muted:#55607A;
  --bd-line:#E1E5EC;--bd-line-soft:#EEF1F5;--bd-gold:#8A6A1F;--bd-gold-soft:#E3C77E;
  --bd-serif:"Newsreader",Georgia,"Times New Roman",serif;
  --bd-sans:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}

/* ---------- Base (scoped so the parent theme cannot leak in) ---------- */
html{-webkit-text-size-adjust:100%}
body.bd-body{margin:0;padding:0;background:var(--bd-ground);color:var(--bd-ink);font-family:var(--bd-sans);font-size:16px;line-height:1.6;overflow-x:hidden}
.bd-site,.bd-site *,.bd-site *::before,.bd-site *::after{box-sizing:border-box}
.bd-site{display:flex;flex-direction:column;min-height:100vh}
.bd-site a{color:var(--bd-ink);text-decoration:none}
.bd-site a:hover,.bd-site a:focus{color:var(--bd-gold)}
.bd-site :focus-visible{outline:2px solid var(--bd-gold);outline-offset:2px}
.bd-site img{max-width:100%;height:auto}
.bd-site h1,.bd-site h2,.bd-site h3,.bd-site h4{font-family:var(--bd-serif);font-weight:500;color:var(--bd-ink);margin:0;line-height:1.15;text-wrap:balance}
.bd-site p{margin:0}
.bd-site ul,.bd-site ol{margin:0;padding:0;list-style:none}
.bd-site button{font-family:inherit;cursor:pointer;margin:0;text-transform:none;letter-spacing:normal;line-height:1.3;box-shadow:none}
.bd-wrap{width:100%;max-width:1160px;margin:0 auto;padding:0 20px}
.bd-skip{position:absolute;left:-9999px;top:0;background:var(--bd-ink);color:#fff;padding:10px 14px;z-index:100}
.bd-skip:focus{left:8px;top:8px}
.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal}
.bd-main{flex:1 0 auto;padding-bottom:48px}
.bd-eyebrow{font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--bd-gold)}
.bd-h2{font-size:24px}
.bd-section{padding-top:32px;display:flex;flex-direction:column;gap:14px}

/* ---------- Header ---------- */
.bd-header{background:var(--bd-surface);border-bottom:1px solid var(--bd-line);position:relative;z-index:20}
.bd-header__in{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:60px;padding-top:8px;padding-bottom:8px}
.bd-site a.bd-logo{display:flex;align-items:center;gap:10px;font-family:var(--bd-serif);font-size:26px;font-weight:600;letter-spacing:-.01em;color:var(--bd-ink);line-height:1}
.bd-logo svg{flex:none;width:34px;height:34px}
.bd-header__btns{display:flex;gap:4px}
.bd-site .bd-iconbtn{width:44px;height:44px;border:0;border-radius:10px;background:transparent;color:var(--bd-ink);display:flex;align-items:center;justify-content:center;padding:0}
.bd-site .bd-iconbtn:hover{background:var(--bd-line-soft);color:var(--bd-ink)}
.bd-nav{display:none}
.bd-nav--mob.is-open{display:block;border-top:1px solid var(--bd-line);background:var(--bd-surface)}
.bd-nav ul{display:flex;flex-direction:column;padding:8px 0}
.bd-nav li{margin:0}
.bd-site .bd-nav a{display:block;padding:12px 0;font-size:16px;font-weight:500}
.bd-nav .sub-menu{padding:0 0 0 16px}
.bd-searchbar{display:none;border-top:1px solid var(--bd-line);background:var(--bd-surface);padding:12px 0}
.bd-searchbar.is-open{display:block}

/* ---------- Search form ---------- */
.bd-search{display:flex;flex-direction:column;gap:6px}
.bd-search__label{font-size:13px;font-weight:500;color:var(--bd-muted)}
.bd-search__row{display:flex;gap:8px}
.bd-site .bd-search__input{flex:1;min-width:0;height:48px;padding:0 14px;border:1px solid #C9D0DC;border-radius:10px;background:var(--bd-surface);font-family:inherit;font-size:16px;color:var(--bd-ink);margin:0;box-shadow:none;width:auto;max-width:none}
.bd-site .bd-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;padding:0 20px;border:0;border-radius:10px;background:var(--bd-ink);color:#fff;font-size:15px;font-weight:600}
.bd-site .bd-btn:hover{background:#1B2A4D;color:#fff}

/* ---------- Ads (filled by Ad Inserter custom hooks) ---------- */
.bd-ad{display:flex;flex-direction:column;align-items:center;justify-content:center;margin:20px auto 0;max-width:100%;overflow:hidden;text-align:center}
.bd-ad--top{min-height:250px}
.bd-ad--side{margin-top:0}

/* ---------- Home: hero ---------- */
.bd-hero{padding-top:28px;display:grid;gap:24px}
.bd-hero__text{display:flex;flex-direction:column;gap:16px;min-width:0}
.bd-site .bd-hero__title{font-size:36px;line-height:1.1;letter-spacing:-.015em}
.bd-hero__lede{font-size:15px;line-height:1.55;color:var(--bd-muted);max-width:46ch}
.bd-switch{display:flex;flex-direction:column;gap:8px}
.bd-switch__label{font-size:13px;font-weight:500;color:var(--bd-muted)}
.bd-switch__row{display:flex;gap:10px;flex-wrap:wrap}
.bd-seg{display:flex;flex:1 1 150px;border:1px solid #C9D0DC;border-radius:10px;overflow:hidden;background:var(--bd-surface)}
.bd-site .bd-seg button{flex:1;min-height:44px;padding:0 10px;border:0;border-radius:0;background:var(--bd-surface);color:var(--bd-ink);font-size:14px;font-weight:600}
.bd-site .bd-seg button[aria-pressed="true"]{background:var(--bd-ink);color:#fff}

/* ---------- Home: quick quiz card ---------- */
.bd-quick{padding:20px;background:var(--bd-ink);color:#fff;border-radius:14px;display:flex;flex-direction:column;gap:12px;min-width:0}
.bd-quick .bd-eyebrow{color:#D9BC74}
.bd-site .bd-quick__q{font-family:var(--bd-serif);font-size:26px;font-weight:500;line-height:1.18;color:#fff}
.bd-quick__opts{display:flex;flex-direction:column;gap:8px}
.bd-site .bd-quick__opt{min-height:48px;padding:10px 14px;text-align:left;border-radius:10px;font-size:15px;font-weight:500;border:1.5px solid #6B7894;background:transparent;color:#fff}
.bd-site .bd-quick__opt:hover{border-color:#fff;background:transparent;color:#fff}
.bd-site .bd-quick__opt.is-right{background:#E6F0E1;border-color:#E6F0E1;color:#1F3A1A}
.bd-site .bd-quick__opt.is-wrong{background:#FBEDE3;border-color:#FBEDE3;color:#5A2A0C}
.bd-quick__fb{font-size:15px;line-height:1.5;color:#fff;min-height:0}
.bd-site a.bd-quick__more{align-self:flex-start;padding:8px 0;font-size:14px;font-weight:600;color:#D9BC74;text-decoration:underline;text-underline-offset:4px}
.bd-site .bd-quick__next{align-self:flex-start;min-height:44px;padding:0 16px;border-radius:10px;border:1.5px solid #D9BC74;background:transparent;color:#D9BC74;font-size:14px;font-weight:600}

/* ---------- Tiles ---------- */
.bd-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bd-site a.bd-tile{display:flex;flex-direction:column;gap:8px;padding:16px;background:var(--bd-surface);border:1px solid var(--bd-line);border-radius:12px}
.bd-site a.bd-tile:hover{border-color:var(--bd-gold);color:var(--bd-ink)}
.bd-tile svg{width:24px;height:24px;color:var(--bd-gold)}
.bd-tile__name{font-size:15px;font-weight:600}
.bd-tile__desc{font-size:13px;line-height:1.45;color:var(--bd-muted)}

/* ---------- Subject list ---------- */
.bd-subjects{background:var(--bd-surface);border:1px solid var(--bd-line);border-radius:12px;overflow:hidden;display:flex;flex-direction:column}
.bd-site a.bd-subject{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:56px;padding:8px 16px;border-bottom:1px solid var(--bd-line-soft)}
.bd-subject:last-child{border-bottom:0}
.bd-subject__name{font-size:15px;font-weight:600;display:block}
.bd-subject__meta{font-size:12px;color:var(--bd-muted);display:block}
.bd-subject svg{flex:none;width:18px;height:18px;color:var(--bd-muted)}
.bd-panel[hidden]{display:none}

/* ---------- Cards ---------- */
.bd-cards{display:grid;gap:12px}
.bd-site .bd-cards--stack{grid-template-columns:minmax(0,1fr)}
.bd-site a.bd-card{display:flex;flex-direction:column;gap:8px;padding:16px;background:var(--bd-surface);border:1px solid var(--bd-line);border-radius:12px;min-width:0}
.bd-site a.bd-card:hover{border-color:var(--bd-gold);color:var(--bd-ink)}
.bd-card__type{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--bd-gold)}
.bd-card__title{font-family:var(--bd-serif);font-size:19px;font-weight:500;line-height:1.25;overflow-wrap:anywhere}
.bd-card__meta{font-size:13px;color:var(--bd-muted)}
.bd-card__img{border-radius:8px;overflow:hidden;aspect-ratio:16/10;background:var(--bd-line-soft)}
.bd-card__img img{width:100%;height:100%;object-fit:cover;display:block}
.bd-cards--memes{grid-template-columns:repeat(2,minmax(0,1fr))}
.bd-cards--memes .bd-card{padding:12px}
.bd-cards--memes .bd-card__title{font-family:var(--bd-sans);font-size:15px;font-weight:600;line-height:1.35}

/* ---------- Listing pages ---------- */
.bd-pagehead{padding-top:24px;display:flex;flex-direction:column;gap:10px}
.bd-site .bd-pagehead__title{font-size:31px;letter-spacing:-.012em}
.bd-pagehead__desc{font-size:15px;color:var(--bd-muted);max-width:60ch}
.bd-crumbs{display:flex;flex-wrap:wrap;gap:6px;font-size:13px;color:var(--bd-muted)}
.bd-site .bd-crumbs a{color:var(--bd-muted);text-decoration:underline;text-underline-offset:3px}
.bd-pager{margin-top:24px}
.bd-pager .nav-links{display:flex;flex-wrap:wrap;gap:8px}
.bd-site .bd-pager .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 12px;border:1px solid var(--bd-line);border-radius:10px;background:var(--bd-surface);font-size:14px;font-weight:600}
.bd-site .bd-pager .page-numbers.current{background:var(--bd-ink);color:#fff;border-color:var(--bd-ink)}
.bd-empty{padding:24px;background:var(--bd-surface);border:1px solid var(--bd-line);border-radius:12px;color:var(--bd-muted)}

/* ---------- Single post ---------- */
.bd-article{padding-top:16px;display:grid;gap:32px}
.bd-article__main{min-width:0;max-width:760px;width:100%;margin:0 auto}
.bd-article__head{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}
.bd-site .bd-article__title{font-size:31px;line-height:1.14;letter-spacing:-.012em;overflow-wrap:anywhere}
.bd-article__meta{font-size:13px;color:var(--bd-muted)}
.bd-article__thumb{margin:0 0 20px;border-radius:12px;overflow:hidden}
.bd-article__thumb img{display:block;width:100%}
.bd-content{font-size:17px;line-height:1.7;overflow-wrap:break-word}
.bd-content>*{margin-top:0;margin-bottom:0}
.bd-content>*+*{margin-top:1.1em}
.bd-site .bd-content p{margin:0 0 1.1em}
.bd-site .bd-content>p:last-child{margin-bottom:0}
.bd-site .bd-content h2{font-size:25px;margin:1.7em 0 .6em;scroll-margin-top:16px}
.bd-site .bd-content h3{font-size:20px;margin:1.5em 0 .5em}
.bd-site .bd-content h4{font-size:17px;font-family:var(--bd-sans);font-weight:600;margin:1.4em 0 .4em}
.bd-site .bd-content a{color:var(--bd-gold);text-decoration:underline;text-underline-offset:3px}
.bd-site .bd-content ul,.bd-site .bd-content ol{margin:0 0 1.1em 1.3em;padding:0}
.bd-site .bd-content ul{list-style:disc}
.bd-site .bd-content ol{list-style:decimal}
.bd-site .bd-content li{margin:0 0 .45em}
.bd-site .bd-content li>ul,.bd-site .bd-content li>ol{margin-top:.45em;margin-bottom:0}
.bd-content blockquote{margin:1.2em 0;padding:14px 18px;background:var(--bd-surface);border:1px solid var(--bd-line);border-radius:12px;font-family:var(--bd-serif);font-size:19px}
.bd-content figure{margin-left:0;margin-right:0}
.bd-site .bd-content figure.wp-block-table,.bd-site .bd-content>.bd-tablewrap{margin-bottom:1.1em}
.bd-content figcaption{font-size:13px;color:var(--bd-muted);margin-top:6px}
.bd-content .wp-block-table,.bd-content .bd-tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.bd-content table{width:100%;border-collapse:collapse;font-size:15px;background:var(--bd-surface)}
.bd-content th,.bd-content td{border:1px solid var(--bd-line);padding:10px 12px;text-align:left;vertical-align:top}
.bd-content th{background:var(--bd-line-soft);font-weight:600}
.bd-content pre{overflow-x:auto;padding:14px;background:var(--bd-ink);color:#fff;border-radius:10px;font-size:14px}
.bd-content iframe,.bd-content video,.bd-content embed{max-width:100%}
.bd-content .alignwide,.bd-content .alignfull{max-width:100%;margin-left:0;margin-right:0}
.bd-article__side{display:none}
.bd-related{margin-top:36px;display:flex;flex-direction:column;gap:12px}
.bd-comments{margin-top:36px}
.bd-site .bd-comments h2,.bd-site .bd-comments h3{font-size:22px;margin-bottom:12px}
.bd-comments .comment-list{display:flex;flex-direction:column;gap:12px;margin-bottom:20px}
.bd-comments .comment-body{padding:14px;background:var(--bd-surface);border:1px solid var(--bd-line);border-radius:12px;font-size:15px}
.bd-comments .children{margin:12px 0 0 16px;display:flex;flex-direction:column;gap:12px}
.bd-comments .comment-meta{font-size:13px;color:var(--bd-muted);margin-bottom:6px}
.bd-comments .avatar{border-radius:50%;vertical-align:middle;margin-right:8px}
.bd-comments label{display:block;font-size:13px;font-weight:500;color:var(--bd-muted);margin-bottom:4px}
.bd-site .bd-comments input[type="text"],.bd-site .bd-comments input[type="email"],.bd-site .bd-comments input[type="url"],.bd-site .bd-comments textarea{width:100%;max-width:100%;padding:12px 14px;border:1px solid #C9D0DC;border-radius:10px;background:var(--bd-surface);font-family:inherit;font-size:16px;color:var(--bd-ink)}
.bd-site .bd-comments .comment-form>p{margin-bottom:12px}
.bd-site .bd-comments input[type="submit"]{min-height:48px;padding:0 20px;border:0;border-radius:10px;background:var(--bd-ink);color:#fff;font-size:15px;font-weight:600;cursor:pointer}

/* ---------- Footer ---------- */
.bd-footer{background:var(--bd-ink);color:#fff;flex-shrink:0}
.bd-footer__in{padding-top:28px;padding-bottom:28px;display:flex;flex-direction:column;gap:16px}
.bd-site .bd-footer a.bd-logo{color:#fff;font-size:24px}
.bd-footer__links ul{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.bd-site .bd-footer__links a{display:block;padding:12px 0;font-size:14px;color:#C8D0E0}
.bd-site .bd-footer__links a:hover{color:#fff}
.bd-footer__note{font-size:12px;line-height:1.55;color:#AEB8CC}

/* ---------- Wider screens ---------- */
@media (min-width:600px){
  .bd-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bd-tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
  .bd-cards--memes{grid-template-columns:repeat(3,minmax(0,1fr))}
  .bd-subjects{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
  .bd-footer__links ul{display:flex;flex-wrap:wrap;gap:0 28px}
}
@media (min-width:900px){
  .bd-wrap{padding:0 24px}
  .bd-h2{font-size:30px}
  .bd-section{padding-top:48px;gap:18px}
  .bd-site a.bd-logo{font-size:30px}
  .bd-logo svg{width:40px;height:40px}
  .bd-header__in{min-height:72px}
  .bd-menu-toggle{display:none!important}
  .bd-nav--desk{display:block}
  .bd-nav--mob,.bd-nav--mob.is-open{display:none}
  .bd-header__in .bd-nav-slot{flex:1;display:flex;justify-content:flex-end}
  .bd-nav ul{flex-direction:row;flex-wrap:wrap;gap:0 24px;padding:0}
  .bd-site .bd-nav a{padding:12px 0;font-size:15px}
  .bd-nav .sub-menu{display:none}
  .bd-hero{padding-top:56px;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:40px;align-items:center}
  .bd-site .bd-hero__title{font-size:56px;line-height:1.04;letter-spacing:-.02em}
  .bd-hero__lede{font-size:18px}
  .bd-quick{padding:32px;border-radius:18px}
  .bd-site .bd-quick__q{font-size:32px}
  .bd-tiles{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:14px}
  .bd-site a.bd-tile{padding:20px}
  .bd-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  .bd-site a.bd-card{padding:22px}
  .bd-card__title{font-size:22px}
  .bd-site .bd-pagehead__title,.bd-site .bd-article__title{font-size:44px}
  .bd-content{font-size:18px}
  .bd-footer__in{flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:space-between;padding-top:36px;padding-bottom:36px}
  .bd-footer__note{flex-basis:100%;max-width:60ch}
}
@media (min-width:1100px){
  .bd-article.has-side{grid-template-columns:minmax(0,760px) 300px;justify-content:center}
  .bd-article.has-side .bd-article__main{margin:0}
  .bd-article.has-side .bd-article__side{display:block}
  .bd-article__side-in{position:sticky;top:20px}
}
@media (prefers-reduced-motion:no-preference){
  .bd-site a.bd-card,.bd-site a.bd-tile{transition:border-color .15s ease}
}
