/*
Theme Name: AD Insight Journal
Description: A reading-focused child theme for AD Insight's website operations journal.
Template: generatepress
Version: 1.0.1
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: adinsight-journal
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
  --aj-ink: #142c46;
  --aj-muted: #53677c;
  --aj-blue: #2d5be8;
  --aj-paper: #fff;
  --aj-fog: #f3f6fa;
  --aj-line: #dce3ec;
  --aj-feature: #edf3ff;
}
body.adinsight-journal { margin: 0; background: var(--aj-fog); color: var(--aj-ink); font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; font-size: 16px; line-height: 1.75; }
.aj-shell, .aj-shell *, .aj-shell *::before, .aj-shell *::after { box-sizing: border-box; }
.aj-shell { max-width: 1160px; min-height: calc(100vh - 80px); margin: 40px auto; border: 1px solid var(--aj-line); border-radius: 10px; background: var(--aj-paper); box-shadow: 0 12px 40px #142c4605; }
.aj-shell a { color: var(--aj-ink); text-decoration: none; }
.aj-shell a:hover { color: var(--aj-blue); }
.aj-shell a:focus-visible, .aj-shell button:focus-visible, .aj-shell input:focus-visible, .aj-shell textarea:focus-visible, .aj-shell select:focus-visible { outline: 3px solid var(--aj-blue); outline-offset: 4px; }
.aj-shell button, .aj-shell input, .aj-shell textarea, .aj-shell select { font: inherit; }
.aj-shell button, .aj-shell a, .aj-shell input { touch-action: manipulation; }
.aj-shell h1, .aj-shell h2, .aj-shell h3, .aj-shell h4 { color: var(--aj-ink); font-family: inherit; font-weight: 700; line-height: 1.5; letter-spacing: -.035em; word-break: keep-all; overflow-wrap: anywhere; }
.aj-shell p, .aj-shell li, .aj-shell dd { word-break: keep-all; overflow-wrap: anywhere; }
.aj-shell h1, .aj-shell h2, .aj-shell h3, .aj-shell p { margin: 0; }
.aj-shell img { max-width: 100%; height: auto; }
.aj-skip-link { position: fixed; left: 16px; top: -100px; z-index: 100001; padding: 12px 20px; background: var(--aj-ink); color: #fff; }
.aj-skip-link:focus { top: 16px; color: #fff; outline: 3px solid var(--aj-blue); outline-offset: 3px; }
.aj-site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 40px; border-bottom: 1px solid var(--aj-line); }
.aj-brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 29px; font-weight: 700; letter-spacing: -1.1px; line-height: 1.2; overflow-wrap: anywhere; }
.aj-shell .aj-brand-mark { display: block; width: 38px; height: 38px; flex: 0 0 auto; }
.aj-brand > span { min-width: 0; }
.aj-menu { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; padding: 0; margin: 0; list-style: none; }
.aj-menu a { display: block; padding: 10px 0; font-size: 13px; font-weight: 700; line-height: 1.6; }
.aj-menu [aria-current='page'], .aj-menu .current-menu-item > a { color: var(--aj-blue); text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; }
.aj-menu-toggle { display: none; }
.aj-main { padding: 40px; }
.aj-main:focus { outline: none; }
.aj-intro { display: grid; grid-template-columns: 1.18fr 1fr; align-items: center; gap: 36px; padding: 4px 0 36px; }
.aj-intro h1 { max-width: 520px; font-size: clamp(26px, 2.45vw, 32px); }
.aj-intro p { margin-top: 12px; max-width: 490px; color: var(--aj-muted); font-size: 13px; line-height: 1.9; }
.aj-search { display: flex; align-items: stretch; gap: 6px; min-width: 0; margin: 0; padding: 6px; border: 1px solid var(--aj-line); border-radius: 8px; background: var(--aj-fog); }
.aj-search input[type='search'] { width: 100%; min-width: 0; min-height: 44px; padding: 10px 8px; border: 0; border-radius: 4px; background: transparent; color: var(--aj-ink); font-size: 13px; }
.aj-search input::placeholder { color: var(--aj-muted); opacity: 1; }
.aj-search button { flex: 0 0 auto; min-width: 60px; min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: 5px; background: var(--aj-blue); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.aj-search button:hover { background: #2149c5; }
.aj-columns { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; }
.aj-list-column, .aj-sidebar, .aj-article, .aj-reading-aside { min-width: 0; }
.aj-section-title { margin-bottom: 16px !important; font-size: 17px; }
.aj-featured-section { margin-bottom: 34px; }
.aj-post-card { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 24px 0; border-top: 1px solid var(--aj-line); }
.aj-card-copy { min-width: 0; flex: 1; }
.aj-category { display: inline-block; font-size: 11px; font-weight: 700; line-height: 1.7; color: var(--aj-muted) !important; }
.aj-category:hover { color: var(--aj-blue) !important; }
.aj-post-card h2, .aj-post-card h3 { margin: 7px 0 9px; font-size: 19px; line-height: 1.6; }
.aj-post-card h2 a:hover, .aj-post-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.aj-excerpt { color: var(--aj-muted); font-size: 13px; line-height: 1.9; }
.aj-card-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; color: var(--aj-muted); font-size: 11px; }
.aj-card-image { flex: 0 0 104px; width: 104px; margin-top: 5px; }
.aj-card-image img { display: block; width: 104px; height: 88px; border: 1px solid var(--aj-line); border-radius: 6px; object-fit: cover; }
.aj-featured { padding: 26px; background: var(--aj-feature); border: 1px solid #d9e5ff; border-radius: 8px; }
.aj-post-card.aj-featured h3 { margin: 12px 0; font-size: 26px; line-height: 1.55; }
.aj-featured .aj-excerpt { font-size: 14px; }
.aj-featured .aj-card-meta { margin-top: 20px; padding-top: 14px; border-top: 1px solid #d2dff2; }
.aj-sidebar section + section { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--aj-line); }
.aj-sidebar h2 { margin-bottom: 15px; font-size: 14px; }
.aj-sidebar p { color: var(--aj-muted); font-size: 12px; line-height: 1.9; }
.aj-topic-panel ul { margin: 0; padding: 0; list-style: none; }
.aj-topic-panel li { border-top: 1px solid var(--aj-line); }
.aj-topic-panel li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 11px 0; font-size: 13px; }
.aj-topic-count { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--aj-muted); }
.aj-empty { padding: 30px 24px; background: var(--aj-fog); border: 1px solid var(--aj-line); border-radius: 7px; color: var(--aj-muted); font-size: 14px; }
.aj-page-heading { display: grid; grid-template-columns: minmax(0, 1fr) 365px; align-items: end; gap: 30px; margin-bottom: 30px; }
.aj-page-heading h1 { font-size: 30px; }
.aj-description, .aj-search-query { margin-top: 12px !important; color: var(--aj-muted); font-size: 14px; }
.aj-description p + p { margin-top: 10px; }
.aj-search-query { overflow-wrap: anywhere; }
.aj-pagination { padding-top: 24px; }
.aj-pagination ul { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.aj-pagination li a, .aj-pagination li span { display: flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; padding: 7px 12px; border-radius: 5px; font-size: 13px; }
.aj-pagination .current { background: var(--aj-blue); color: #fff; }
.aj-pagination li a { border: 1px solid var(--aj-line); }
.aj-pagination li a:hover { border-color: var(--aj-blue); }
.aj-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; color: var(--aj-muted); font-size: 11px; }
.aj-breadcrumbs a { color: var(--aj-muted); text-decoration: underline; text-underline-offset: 3px; }
.aj-reading-layout { max-width: 760px; margin: 0 auto; }
.aj-reading-layout.aj-has-toc { display: grid; grid-template-columns: minmax(0, 1fr) 216px; gap: 42px; max-width: none; }
.aj-post-heading h1 { margin: 12px 0 18px; font-size: clamp(27px, 2.65vw, 35px); line-height: 1.5; letter-spacing: -.045em; }
.aj-lead { margin-bottom: 20px !important; color: var(--aj-muted); font-size: 15px; line-height: 1.95; }
.aj-post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0 0 24px; margin-bottom: 26px; border-bottom: 1px solid var(--aj-line); color: var(--aj-muted); font-size: 11px; }
.aj-post-meta time { white-space: nowrap; }
.aj-evidence { display: flex; flex-wrap: wrap; gap: 12px 26px; margin: 0 0 28px; padding: 17px 20px; border-left: 3px solid var(--aj-blue); background: var(--aj-fog); font-size: 12px; }
.aj-evidence div { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.aj-evidence dt { color: var(--aj-muted); font-weight: 400; }
.aj-evidence dd { margin: 0; font-weight: 700; }
.aj-post-image { margin: 0 0 28px; }
.aj-post-image img { display: block; width: 100%; border-radius: 6px; }
.aj-post-image figcaption { margin-top: 8px; color: var(--aj-muted); font-size: 12px; }
.aj-content { margin: 0; font-size: 16px; line-height: 1.95; overflow-wrap: anywhere; }
.aj-content > * + * { margin-top: 20px; }
.aj-content p { margin: 0 0 20px; }
.aj-content h2 { margin: 36px 0 14px; font-size: 23px; scroll-margin-top: 40px; }
.aj-content h3 { margin: 28px 0 12px; font-size: 19px; scroll-margin-top: 40px; }
.admin-bar .aj-content h2, .admin-bar .aj-content h3 { scroll-margin-top: 80px; }
.aj-content h4 { margin: 24px 0 10px; font-size: 17px; }
.aj-content a, .aj-sources a { color: var(--aj-blue); text-decoration: underline; text-underline-offset: 3px; }
.aj-content a:hover, .aj-sources a:hover { color: #173da9; }
.aj-content ul, .aj-content ol { margin: 18px 0 24px 24px; padding: 0; }
.aj-content li + li { margin-top: 8px; }
.aj-content blockquote { margin: 24px 0; padding: 16px 22px; border-left: 3px solid var(--aj-blue); background: var(--aj-fog); font-size: 16px; font-style: normal; }
.aj-content blockquote p:last-child { margin-bottom: 0; }
.aj-content code { padding: 2px 5px; border-radius: 3px; background: var(--aj-fog); color: var(--aj-ink); font-family: ui-monospace, Consolas, monospace; font-size: .88em; overflow-wrap: anywhere; }
.aj-content pre { max-width: 100%; padding: 20px; overflow-x: auto; border: 1px solid var(--aj-line); border-radius: 6px; background: var(--aj-fog); white-space: pre; font-size: 13px; line-height: 1.7; }
.aj-content pre code { padding: 0; background: transparent; }
.aj-content table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 13px; }
.aj-content th, .aj-content td { padding: 12px; border: 1px solid var(--aj-line); min-width: 110px; text-align: left; vertical-align: top; }
.aj-content th { background: var(--aj-fog); }
.aj-content figure { max-width: 100%; margin-left: 0; margin-right: 0; }
.aj-content .alignwide, .aj-content .alignfull { width: 100%; max-width: 100%; margin-left: 0; margin-right: 0; }
.aj-content iframe, .aj-content video, .aj-content embed { max-width: 100%; }
.aj-content .wp-block-embed__wrapper { overflow: hidden; }
.aj-content hr { margin: 32px 0; background: var(--aj-line); }
.aj-toc { position: sticky; top: 24px; padding: 20px; border-radius: 7px; background: var(--aj-fog); }
.admin-bar .aj-toc { top: 56px; }
.aj-toc h2 { margin-bottom: 12px; font-size: 13px; }
.aj-toc ol { margin: 0; padding: 0; list-style: none; }
.aj-toc li a { display: block; padding: 7px 0; color: var(--aj-muted); font-size: 12px; line-height: 1.7; }
.aj-toc li a:hover { color: var(--aj-blue); }
.aj-toc .aj-level-3 { padding-left: 12px; }
.aj-mobile-toc { display: none; margin: 0 0 26px; border: 1px solid var(--aj-line); border-radius: 7px; background: var(--aj-fog); }
.aj-mobile-toc > summary { min-height: 44px; padding: 12px 18px; font-size: 13px; font-weight: 700; line-height: 1.6; cursor: pointer; }
.aj-mobile-toc > summary:focus-visible { outline: 3px solid var(--aj-blue); outline-offset: 4px; }
.aj-mobile-toc .aj-toc { padding: 0 18px 16px; background: transparent; }
.aj-mobile-toc .aj-toc h2 { display: none; }
.aj-sources, .aj-author, .aj-related { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--aj-line); }
.aj-sources h2, .aj-author h2, .aj-related > h2 { margin-bottom: 16px; font-size: 18px; }
.aj-sources ul { margin: 0 0 0 20px; padding: 0; font-size: 13px; }
.aj-sources li + li { margin-top: 8px; }
.aj-author strong { font-size: 14px; }
.aj-author p { margin-top: 10px; color: var(--aj-muted); font-size: 13px; line-height: 1.85; }
.aj-related .aj-post-card h3 { font-size: 17px; }
.aj-related .aj-post-card:first-of-type { border-top: 0; padding-top: 4px; }
.aj-back { display: inline-flex; min-height: 44px; align-items: center; margin-top: 24px; font-size: 13px; text-decoration: underline !important; text-underline-offset: 4px; }
.aj-page-article { max-width: 760px; margin: 0 auto; }
.aj-page-article .aj-post-heading { margin-bottom: 30px; }
.aj-error { max-width: 650px; margin: 45px auto 65px; }
.aj-error-code { color: var(--aj-blue); font-family: Georgia, serif; font-size: 52px; font-weight: 700; }
.aj-error h1 { margin: 12px 0 16px; font-size: 30px; }
.aj-error p { margin-bottom: 26px; color: var(--aj-muted); font-size: 14px; }
.aj-site-footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 40px; border-top: 1px solid var(--aj-line); color: var(--aj-muted); font-size: 11px; }
.aj-site-footer nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0 22px; }
.aj-footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none; }
.aj-footer-links a, .aj-rss-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--aj-muted) !important; text-decoration: underline !important; text-underline-offset: 3px; }
.aj-footer-brand { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.aj-footer-brand .aj-brand-mark { width: 24px; height: 24px; }
.aj-shell .comments-area { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--aj-line); }
.aj-shell .comment-form textarea, .aj-shell .comment-form input:not([type='checkbox']) { width: 100%; max-width: 100%; border: 1px solid var(--aj-line); border-radius: 5px; background: var(--aj-fog); color: var(--aj-ink); }
.aj-shell .comment-form input[type='submit'] { width: auto; background: var(--aj-blue); color: #fff; }
.aj-shell .comment-form label { display: block; font-size: 13px; }
.aj-shell .comment-form-cookies-consent label { display: inline; }
.aj-shell .post-password-form input { max-width: 100%; border: 1px solid var(--aj-line); }
.aj-shell .post-password-form input[type='submit'] { min-height: 44px; background: var(--aj-blue); color: white; }
@media (max-width: 1200px) {
  .aj-shell { margin: 24px 20px; min-height: calc(100vh - 48px); }
}
@media (max-width: 980px) {
  .aj-site-header, .aj-site-footer { padding: 24px 28px; }
  .aj-main { padding: 32px 28px; }
  .aj-columns { grid-template-columns: minmax(0, 1fr) 200px; gap: 28px; }
  .aj-intro { grid-template-columns: 1fr; gap: 22px; }
  .aj-intro h1 { max-width: 650px; }
  .aj-intro p { max-width: 650px; }
  .aj-intro .aj-search { max-width: 580px; }
  .aj-page-heading { grid-template-columns: 1fr; gap: 20px; }
  .aj-page-heading .aj-search { max-width: 580px; }
  .aj-reading-layout.aj-has-toc { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 760px; }
  .aj-reading-aside { display: none; }
  .aj-mobile-toc { display: block; }
  .aj-toc { position: static; }
  .aj-toc ol { display: flex; flex-wrap: wrap; column-gap: 18px; }
  .aj-toc li { flex-basis: calc(50% - 9px); }
  .aj-toc .aj-level-3 { padding-left: 0; }
}
@media (max-width: 760px) {
  .aj-shell { margin: 14px 12px; min-height: calc(100vh - 28px); border-radius: 8px; }
  .aj-site-header { flex-wrap: wrap; gap: 8px 18px; padding: 20px 22px; }
  .aj-brand { max-width: calc(100% - 82px); font-size: 27px; }
  .aj-brand .aj-brand-mark { width: 32px; height: 32px; }
  .aj-menu-toggle:not([hidden]) { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 7px 0 7px 10px; border: 0; background: transparent; color: var(--aj-ink); font-size: 12px; cursor: pointer; }
  .aj-menu-icon { position: relative; display: inline-block; width: 17px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
  .aj-menu-icon::after { position: absolute; left: 0; right: 0; top: 3px; height: 2px; background: currentColor; content: ''; }
  .aj-navigation { width: 100%; }
  .aj-has-js .aj-navigation { display: none; }
  .aj-has-js .aj-navigation.is-open { display: block; }
  .aj-menu { gap: 0 20px; padding-top: 8px; }
  .aj-menu a { min-height: 44px; font-size: 12px; }
  .aj-main { padding: 28px 22px 32px; }
  .aj-intro { padding: 0 0 30px; }
  .aj-intro h1 { font-size: 27px; }
  .aj-columns { display: flex; flex-direction: column; gap: 30px; }
  .aj-sidebar { order: -1; }
  .aj-sidebar .aj-about-panel { display: none; }
  .aj-topic-panel h2 { margin-bottom: 10px; font-size: 12px; }
  .aj-topic-panel ul { display: flex; flex-wrap: wrap; gap: 7px; }
  .aj-topic-panel li { border: 0; }
  .aj-topic-panel li a { min-height: 44px; gap: 12px; padding: 8px 12px; border: 1px solid var(--aj-line); border-radius: 5px; font-size: 12px; }
  .aj-featured { padding: 22px; }
  .aj-post-card.aj-featured h3 { font-size: 23px; }
  .aj-featured-section { margin-bottom: 30px; }
  .aj-post-card h2, .aj-post-card h3 { font-size: 18px; }
  .aj-card-image { flex-basis: 76px; width: 76px; }
  .aj-card-image img { width: 76px; height: 76px; }
  .aj-featured .aj-card-image { display: none; }
  .aj-page-heading h1 { font-size: 28px; }
  .aj-post-heading h1 { font-size: 28px; }
  .aj-content { font-size: 15px; }
  .aj-content h2 { font-size: 22px; }
  .aj-evidence { padding: 15px 17px; }
  .aj-toc { padding: 17px; }
  .aj-toc li { flex-basis: 100%; }
  .aj-toc li a { min-height: 38px; }
  .aj-site-footer { align-items: flex-start; flex-direction: column; gap: 8px; padding: 20px 22px; }
  .aj-footer-links { gap: 0 18px; }
  .aj-footer-links a { min-height: 44px; }
  .aj-error { margin: 18px auto 36px; }
  .aj-error h1 { font-size: 27px; }
}
@media (max-width: 380px) {
  .aj-shell { margin: 8px; }
  .aj-brand { gap: 8px; font-size: 24px; }
  .aj-brand .aj-brand-mark { width: 30px; height: 30px; }
  .aj-site-header, .aj-site-footer { padding-left: 18px; padding-right: 18px; }
  .aj-main { padding-left: 18px; padding-right: 18px; }
  .aj-intro h1, .aj-post-heading h1 { font-size: 25px; }
  .aj-search input[type='search'] { font-size: 12px; padding-left: 5px; }
  .aj-search button { min-width: 52px; padding-left: 12px; padding-right: 12px; }
  .aj-post-card { gap: 14px; }
  .aj-card-image { flex-basis: 60px; width: 60px; }
  .aj-card-image img { width: 60px; height: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .aj-shell *, .aj-shell *::before, .aj-shell *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
