/* ThaiHIV365 / Blue calendar. Loaded after the isolated legacy layer. */
:root {
  --bg: #f5f8ff; --bg-card: #fff; --bg-soft: #eaf0ff; --bg-subtle: #f7f9ff;
  --navy-dark: #11264d; --navy-slate: #173360; --navy-surface: #173360;
  --accent: #205bdd; --accent-cyan: #205bdd; --accent-teal: #205bdd;
  --accent-light: #eaf0ff; --accent-hot: #205bdd; --hot-coral: #c93c68;
  --hot-amber: #ffd65c; --hot-soft: #fff6d6; --text-main: #11264d;
  --text-muted: #52627e; --text-light: #61718b; --border: #d9e2f2;
  --border-focus: #205bdd; --font-display: 'Figtree', 'Noto Sans Thai', sans-serif;
  --radius-full: 10px; --radius-sm: 10px; --radius-md: 16px; --radius-lg: 22px;
  --max-w: 1240px; --header-height: 88px;
  --shadow-sm: 0 2px 6px #11264d06; --shadow-md: 0 12px 30px #11264d0a;
  --shadow-lg: 0 18px 44px #11264d12; --shadow-glow: none;
}
html { color: var(--text-main); background: var(--bg); scroll-padding-top: 110px; }
body { background: var(--bg); padding-top: var(--header-height); font-size: 16px; line-height: 1.75; }
.container { max-width: var(--max-w); width: 100%; padding-inline: 32px; }
h1,h2,h3,h4 { color: var(--text-main); line-height: 1.35; }
a { color: var(--accent); }
a:focus-visible,button:focus-visible,input:focus-visible,summary:focus-visible { outline: 3px solid #d88700; outline-offset: 5px; }
.site-header { height: var(--header-height); background: #fff; color: var(--text-main); border-bottom: 1px solid var(--border); box-shadow: none; }
.header-inner { gap: 20px; }
.brand-logo,.brand-title { color: var(--text-main); }
.brand-logo:hover { transform: none; }
.brand-title { font-size: 1.1rem; white-space: nowrap; }
.brand-logo>svg { width: 36px; height: 36px; flex-shrink: 0; }
.brand-logo>svg>rect:first-child { fill: var(--accent); }
.text-accent { color: var(--accent); }
.main-nav { gap: 3px; margin-left: auto; }
.nav-link { color: #52627e; font-size: .9rem; padding: 10px 11px; border-radius: 8px; }
.nav-link:hover,.nav-link.active { color: #174bbc; background: #edf2ff; }
.header-actions { gap: 10px; }
.btn { min-height: 46px; padding: 11px 22px; border: 1px solid transparent; border-radius: 10px; font: 600 .95rem/1.5 var(--font); box-shadow: none; }
.btn-primary,.btn-hot { background: #205bdd; color: #fff !important; box-shadow: none; }
.btn-primary:hover,.btn-hot:hover { background: #1746b3; transform: translateY(-2px); box-shadow: none; }
.btn-secondary,.btn-ghost { background: #fff; color: #173360 !important; border: 1px solid #cbd6e9; box-shadow: none; }
.btn-secondary:hover,.btn-ghost:hover { background: #eef3ff; border-color: var(--accent); }
.header-book-btn { font-size: .9rem; padding: 10px 16px; }
.mobile-toggle { color: #173360; }

/* Existing introduction + four plan links now form one two-column opening. */
/* Keep the gutters inside the same bounded container as the header.
   Viewport-based percentage padding here squeezed the columns on wide screens. */
.planner-opening { width: 100%; max-width: var(--max-w); margin: auto; padding: 60px 32px 64px; display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,1fr); gap: 64px; align-items: center; }
.planner-opening>* { min-width: 0; }
.home-hero.brand-hero { min-height: 0; padding: 0; background: none; color: var(--text-main); display: block; overflow: visible; border: 0; border-radius: 0; }
.brand-hero::before,.brand-hero::after { content: none; }
.planner-opening .hero-inner { padding: 0; width: 100%; max-width: none; position: static; }
.home-hero-copy { max-width: none; padding: 0; text-align: left; }
.hero-eyebrow { display: inline-flex; padding: 7px 12px; margin: 0 0 24px; color: #174bbc; background: #e5edff; border: 0; border-radius: 6px; font-size: .875rem; font-weight: 600; letter-spacing: 0; }
.hero-heading { margin: 0; }
.hero-name { display: block; color: #11264d; font-size: clamp(2.5rem,4vw,3.65rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.2; margin: 0; }
.hero-name .text-accent { display: block; color: var(--accent); font-size: clamp(6.8rem,12.5vw,11rem); letter-spacing: -.075em; font-weight: 800; line-height: 1; margin: 0 0 15px -5px; }
.hero-desc { font-size: 1.1rem; line-height: 1.8; max-width: 470px; margin: 16px 0 0; color: var(--text-muted); }
.hero-actions { margin: 25px 0 0; gap: 10px; }
.hero-search-box { display: flex; margin-top: 26px; padding: 7px 7px 7px 16px; border: 1px solid #cbd6e9; border-radius: 12px; background: #fff; max-width: 480px; box-shadow: none; gap: 10px; }
.hero-search-box input { color: var(--text-main); min-width: 0; width: 100%; font-size: 1rem; }
.hero-search-box input::placeholder { color: #66758c; opacity: 1; }
.hero-search-box svg { color: #52627e; }
.hero-search-box .btn { background: #edf2ff; border: 0; padding-inline: 15px; }
.hero-search-box .btn { flex: 0 0 auto; width: auto; }
.hero-search-box input { flex: 1 1 0; }
.hero-name .text-accent { -webkit-text-fill-color: #205bdd; text-shadow: none; }
.brand-mark { display: block; width: 43px; height: 43px; flex: 0 0 43px; }
.habit-strip { margin: 0; padding: 0; background: #fff; border: 1px solid #cad8f0; border-radius: 22px; box-shadow: 0 18px 55px #1d4b9912; overflow: hidden; align-self: center; }
.habit-strip>.container { padding: 0; width: 100%; max-width: none; background: none; border: 0; box-shadow: none; }
.era-strip-head { padding: 27px 28px 22px; margin: 0; background: #205bdd; color: #fff; border-bottom: 1px solid #ffffff30; }
.era-strip-head h2 { font-size: 1.25rem; color: #fff; line-height: 1.5; }
.era-strip-head p { color: #e1eaff; font-size: .925rem; margin-top: 8px; }
.habit-strip-grid { grid-template-columns: 1fr; border: 0; gap: 0; counter-reset: habit; }
.era-anchor { counter-increment: habit; display: grid; grid-template-columns: 54px 1fr 20px; gap: 0 14px; padding: 23px 25px; border: 0; border-bottom: 1px solid #e2e8f3; border-radius: 0; background: #fff; color: var(--text-main); }
.era-anchor:last-child { border-bottom: 0; }
.era-anchor::before { content: counter(habit,decimal-leading-zero); position: static; grid-column: 1; grid-row: 1/4; width: 50px; height: 50px; background: #edf2ff; color: #205bdd; border: 0; border-radius: 13px; display: grid; place-items: center; font: 700 1.35rem var(--font-display); }
.era-anchor::after { content: '↗'; grid-column: 3; grid-row: 1/4; align-self: center; font-size: 1.35rem; color: var(--accent); }
.era-anchor>* { grid-column: 2; }
.era-badge { display: inline; font-size: .8rem; font-weight: 600; color: #52627e; }
.era-anchor strong { font-size: 1.06rem; }
.era-anchor span:last-child { font-size: .875rem; line-height: 1.6; color: #52627e; }
.era-anchor:hover { background: #f0f5ff; color: var(--text-main); transform: none; }

.hub-section,.articles-section { padding: 65px 0; background: #fff; }
.hub-section { border-block: 1px solid var(--border); }
.section-header { text-align: left; margin-bottom: 30px; max-width: none; }
.section-title { font-size: clamp(1.8rem,3vw,2.5rem); letter-spacing: -.025em; margin: 5px 0 8px; }
.section-tag { background: none; padding: 0; color: #205bdd; border: 0; font-size: .8rem; letter-spacing: .15em; }
.section-subtitle { color: #52627e; margin: 0; max-width: 720px; }
.hub-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.hub-card { padding: 26px; border: 1px solid #d9e2f2; border-radius: 16px; background: #f7f9ff; box-shadow: none; color: #11264d; display: flex; flex-direction: column; }
.hub-card:nth-child(2n) { background: #fff; }
.hub-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.hub-card-meta { margin-bottom: 20px; }
.badge { font-size: .8rem; line-height: 1.5; border-radius: 6px; background: #e7eeff; color: #174bbc; padding: 4px 10px; }
.badge-hot { background: #ffedf2; color: #a6214e; }
.hub-card-title { font-size: 1.2rem; margin-bottom: 10px; }
.hub-card-lead { color: #52627e; font-size: 1rem; line-height: 1.75; }
.hub-card-footer { border-top: 1px solid var(--border); margin-top: auto; padding-top: 18px; color: var(--accent); }
.articles-section { background: var(--bg); }
.article-section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.article-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 25px; }
.article-card { background: #fff; border: 1px solid #d9e2f2; border-radius: 16px; box-shadow: none; overflow: hidden; transform: none; }
.article-card:hover { transform: translateY(-4px); border-color: #9eb8ee; box-shadow: var(--shadow-md); }
.article-thumb-wrap { border-radius: 0; aspect-ratio: 16/10; }
.article-thumb-wrap img { width: 100%; height: 100%; object-fit: cover; }
.article-card-body { padding: 23px; }
.article-card-title { font-size: 1.2rem; line-height: 1.5; }
.article-card-title a { color: #11264d; }
.article-card-excerpt { font-size: 1rem; line-height: 1.75; color: #52627e; }
.article-cat-badge { background: #e7eeff; color: #174bbc; border-radius: 5px; padding: 4px 9px; }
.soft-cta-band { padding: 44px 0; margin: 0; background: #205bdd; color: #fff; border: 0; border-radius: 0; }
.soft-cta-band h2 { color: #fff; }
.soft-cta-band p { color: #e5edff; }
.soft-cta-band .btn-primary { background: #ffda67; color: #11264d !important; }

/* Existing inner pages share the new typography and reading surfaces. */
.static-mast { background: #eaf0ff; padding: 55px 0; border-bottom: 1px solid #d3dff5; color: #11264d; }
.static-mast h1 { font-size: clamp(2rem,4vw,3.2rem); font-weight: 700; margin: 10px 0; }
.static-mast p { font-size: 1.1rem; color: #52627e; max-width: 760px; }
.article-page { padding-block: 24px 60px; background: var(--bg); }
.article-header { padding: 30px 0 35px; border: 0; background: transparent; color: #11264d; }
.article-title { color: #11264d; font-size: clamp(2rem,3.5vw,3.35rem); line-height: 1.4; max-width: 1000px; margin-top: 18px; }
.article-header::after,.static-mast::after { content: none; }
.breadcrumbs-wrap { color: #52627e; }
.article-main-grid { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 36px; align-items: start; }
.article-content { background: #fff; border: 1px solid #d9e2f2; border-radius: 18px; padding: 32px; min-width: 0; }
.article-body { font-size: 1.075rem; line-height: 1.95; color: #243654; }
.article-body h2 { color: #11264d; padding: 0; border: 0; margin-block: 32px 15px; }
.article-body a { text-decoration: underline; text-underline-offset: 3px; }
.sidebar-widget,.author-box,.eeat-strip { border: 1px solid #d9e2f2; background: #fff; border-radius: 14px; box-shadow: none; }
.about-block,.contact-action-grid>a { border-radius: 14px; border-color: #d9e2f2; box-shadow: none; }
.about-expanded,.contact-expanded,.privacy-expanded { background: transparent; border: 0; box-shadow: none; }
.site-footer { background: #11264d; color: #fff; padding-top: 50px; border-top: 0; }
.footer-heading,.footer-brand .brand-title { color: #fff; }
.footer-links a,.footer-tagline,.footer-contact,.footer-disclaimer { color: #cad7ee; }
.cookie-bar { background: #fff; color: #11264d; border: 1px solid #cbd6e9; border-radius: 16px; box-shadow: 0 12px 45px #11264d26; }
.cookie-text { color: #3d4e6a; font-size: .875rem; }
.btn-cookie-necessary { background: #edf2ff; color: #11264d; border-color: #cbd6e9; }
.hidden,[hidden] { display: none !important; }

@media(max-width:1100px) {
  .main-nav { display: none; } .mobile-toggle { display: block; }
  .main-nav.is-open { display: flex; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; padding: 18px 24px; max-height: calc(100dvh - var(--header-height)); overflow-y: auto; background: #fff; border-bottom: 1px solid #d9e2f2; box-shadow: var(--shadow-md); align-items: stretch; }
  .planner-opening { gap: 32px; padding: 45px 32px; }
  .article-main-grid { grid-template-columns: minmax(0,1fr) 280px; gap: 24px; }
}
@media(max-width:900px) {
  .planner-opening { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:760px) {
  :root { --header-height: 74px; }
  .container { padding-inline: 20px; }
  .planner-opening { grid-template-columns: 1fr; gap: 32px; padding: 35px 20px 42px; }
  .hero-name { font-size: 2.65rem; } .hero-name .text-accent { font-size: 7rem; }
  .hero-desc { font-size: 1rem; } .hero-eyebrow { margin-bottom: 20px; }
  .hero-search-box { max-width: none; } .hero-actions .btn { flex: 1; }
  .era-strip-head { padding: 22px; } .era-anchor { padding: 18px 20px; }
  .hub-section,.articles-section { padding-block: 42px; }
  .hub-grid,.article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .article-section-header { display: block; } .article-section-header>.btn { margin-top: 16px; }
  .article-main-grid { grid-template-columns: 1fr; }
  .article-content { padding: 23px; } .static-mast { padding: 35px 0; }
  .article-sidebar { position: static; }
}
@media(max-width:520px) {
  .brand-logo { gap: 8px; } .brand-title { font-size: .975rem; }
  .header-book-btn { padding: 8px 10px; font-size: .8rem; min-height: 40px; }
  .header-inner { gap: 10px; } .header-actions { gap: 6px; }
  .hub-grid,.article-grid { grid-template-columns: 1fr; }
  .article-content { padding: 20px; }
  .soft-cta-actions { width: 100%; } .soft-cta-actions .btn { flex: 1; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
