/* Reusable cards, tags, buttons and form controls */
.post{position:relative;background:linear-gradient(145deg,#151f2b,#101720);border:1px solid var(--line);padding:24px;border-radius:16px;margin:0 0 16px;box-shadow:0 12px 35px #00000020;transition:transform .2s,border-color .2s,box-shadow .2s}
.post:hover{transform:translateY(-2px);border-color:#53677b;box-shadow:0 16px 38px #00000038}
.post>a:first-child{display:inline-block;color:#f4f7fb;font-size:1.24rem;font-weight:750;line-height:1.35;letter-spacing:-.02em}
.post>a:first-child:hover{color:var(--orange-2);text-decoration:none}
.post p{color:#afbdcb;margin-top:10px}
.post .post-date{font-size:.82rem;color:#8294a7;margin-top:7px}
.post-content{max-width:850px;margin:0 auto;padding:clamp(22px,5vw,46px)}
.post-content h1{font-size:clamp(2rem,5vw,3rem);line-height:1.15;letter-spacing:-.04em;margin-bottom:10px}
.post-content>div{margin-top:26px;color:#d4dee8;font-size:1.04rem;line-height:1.85;overflow-wrap:anywhere}
.post-content>div h2,.post-content>div h3{color:#f5f8fb;margin:1.6em 0 .55em;line-height:1.3}
.post-content>div p{margin:0 0 1.1em}
.post-content>div ul,.post-content>div ol{padding-left:1.5em;margin:0 0 1.2em}
.post-content>div img{border-radius:12px;margin:1.4em auto;max-height:520px;object-fit:contain}
.post-content>div blockquote{border-left:3px solid var(--orange);padding:12px 18px;margin:1.4em 0;background:#ff8a320c;color:#cbd7e3;border-radius:0 10px 10px 0}
.post-content>div pre{overflow:auto;padding:16px;background:#080d13;border:1px solid var(--line);border-radius:10px}
.post-content>div code{font-family:ui-monospace,monospace;color:#ffc18c}
.tags{margin-top:14px;display:flex;flex-wrap:wrap;gap:7px}
.tag,.tag-pill{display:inline-flex;align-items:center;background:#ff8a3217;border:1px solid #ff8a3240;padding:3px 10px;border-radius:999px;font-size:.76rem;font-weight:700;color:var(--orange-2);letter-spacing:.02em}
.no-tag{display:inline-flex;background:#1d2935;color:#9aabba;padding:3px 10px;border-radius:999px;font-size:.76rem}
.hero{position:relative;overflow:hidden;text-align:center;padding:clamp(42px,8vw,82px) 24px;background:linear-gradient(135deg,#172638,#111923 70%);border:1px solid #304357;border-radius:22px;margin-bottom:34px}
.hero:after{content:"";position:absolute;width:280px;height:280px;border:1px solid #ff8a3228;border-radius:50%;right:-110px;bottom:-190px;box-shadow:0 0 0 30px #ff8a3208,0 0 0 60px #ff8a3205}
.hero h2{font-size:clamp(2rem,5vw,3.35rem);line-height:1.12;letter-spacing:-.05em;color:#fff;margin-bottom:16px}
.hero>p{max-width:650px;margin:0 auto;color:#b7c5d3;font-size:1.08rem}
.hero .hero-btn{margin-top:27px}
.hero-btn a{display:inline-flex;padding:11px 21px;border-radius:999px;background:var(--orange);color:#17100a;font-weight:800;box-shadow:0 8px 25px #ff8a3230}
.hero-btn a:hover{background:#ffad68;text-decoration:none;transform:translateY(-1px)}
.section-title{display:block;color:#f3f6fa;font-size:1.65rem;letter-spacing:-.035em;margin:0 0 18px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.latest-posts-container{display:block}
.error-message{padding:28px;border:1px solid #69433b;background:#291a19;border-radius:14px}
input[type=text],input[type=password],input[type=email],textarea,select{padding:11px 13px;border-radius:9px;border:1px solid var(--line);background:#0c131b;color:var(--text);width:100%;font:inherit}
textarea{min-height:140px}
button{background:var(--orange);color:#17100a;border:0;padding:9px 16px;border-radius:9px;font-weight:750;transition:background .2s}
button:hover{background:#ffad68}

/* Responsive YouTube embeds in article bodies */
.post-content>div.article-video{width:min(100%,760px);aspect-ratio:16/9;margin:1.5em auto;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:#080d13}
.post-content>div.article-video iframe{display:block;width:100%;height:100%;border:0}
.post-content>div.article-video-small{max-width:560px}
.post-content>div.article-video-large{max-width:1000px}
.post-content>div.article-video-normal{aspect-ratio:16/9;height:auto}
.post-content>div.article-video-custom{aspect-ratio:auto;max-width:100%;height:360px}

/* Images inserted from the admin media library */
.post-content>div figure.article-image{margin:1.5em auto;text-align:center}
.post-content>div figure.article-image img{display:block;max-width:100%;height:auto;max-height:520px;margin:0 auto;object-fit:contain}
.post-content>div figure.article-image figcaption{margin-top:8px;color:#93a8ba;font-size:.84rem}


/* Stage 2: article image layouts and structured content */
.post-content>div figure.article-image{box-sizing:border-box;max-width:100%;margin:1.5em auto;text-align:center}
.post-content>div figure.article-image img{display:block;width:100%;max-width:100%;height:auto;max-height:520px;margin:0 auto;object-fit:contain}
.post-content>div figure.article-image--small{width:35%}
.post-content>div figure.article-image--medium{width:60%}
.post-content>div figure.article-image--large{width:80%}
.post-content>div figure.article-image--full{width:100%}
.post-content>div figure.article-image--left{margin-left:0;margin-right:auto;text-align:left}
.post-content>div figure.article-image--center{margin-left:auto;margin-right:auto;text-align:center}
.post-content>div figure.article-image--right{margin-left:auto;margin-right:0;text-align:right}
.post-content>div figure.article-image figcaption{margin-top:8px;color:#93a8ba;font-size:.84rem}
.post-content>div table.article-table{display:block;width:100%;max-width:100%;overflow-x:auto;border-collapse:collapse;margin:1.4em 0}
.post-content>div table.article-table th,.post-content>div table.article-table td{padding:9px 12px;border:1px solid var(--line);text-align:left;white-space:normal}
.post-content>div table.article-table th{background:#1a2937;color:#ffd0a5;font-weight:750}
.post-content>div table.article-table tbody tr:nth-child(even){background:#ffffff06}
.post-content>div aside.article-callout{margin:1.4em 0;padding:14px 18px;border-left:4px solid var(--orange);border-radius:0 10px 10px 0;background:#ff8a320d;color:#cbd7e3}
.post-content>div aside.article-callout>strong{display:block;margin-bottom:5px;color:var(--orange-2);font-size:.92rem}
.post-content>div aside.article-callout p:last-child{margin-bottom:0}
.post-content>div aside.article-callout--warning{border-left-color:#e58c52;background:#e58c5212}
.post-content>div aside.article-callout--definition{border-left-color:#77a9d8;background:#77a9d812}
.post-content>div aside.article-callout--key-concept{border-left-color:#9b91df;background:#9b91df14}
.post-content>div pre.article-code{overflow:auto;padding:15px;background:#080d13;border:1px solid var(--line);border-radius:10px;white-space:pre}
.post-content>div pre.article-code code{color:#ffc18c;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
@media(max-width:600px){.post-content>div figure.article-image--small,.post-content>div figure.article-image--medium,.post-content>div figure.article-image--large{width:100%}}


/* Stage 2: natural-size image option */
.post-content>div figure.article-image--auto{width:fit-content;max-width:100%}
.post-content>div figure.article-image--auto img{width:auto;max-width:100%}


/* Compact rich excerpts on Home and Blogs cards */
.post .post-excerpt{line-height:1.65;overflow-wrap:anywhere}
.post .post-excerpt a{color:var(--orange-2);text-decoration:underline;text-underline-offset:2px}
.post .post-excerpt strong{color:#e9f0f7}
.post .post-excerpt code{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#ffc18c}
.post .post-excerpt .card-math-block{display:block;max-width:100%;overflow-x:auto;text-align:center;margin:.35em 0}
.post .post-excerpt .card-math-inline{display:inline}
.post .post-excerpt mjx-container{max-width:100%;overflow-x:auto;overflow-y:hidden}


/* Stage 5: science-specific article blocks */
.post-content>div .science-block{margin:1.7em 0;padding:18px 20px;border:1px solid #34485b;border-radius:13px;background:linear-gradient(145deg,#142130,#101923);color:#d5e0ea}
.post-content>div .science-block h3{margin:0 0 13px;color:#ffd0a5;font-size:1.12rem}
.post-content>div .science-block h4{margin:1.15em 0 .45em;color:#f2f6fa;font-size:.98rem}
.post-content>div .science-equation-formula{padding:16px 10px;margin:12px 0;text-align:center;overflow-x:auto;border-radius:9px;background:#080f17;font-size:1.12em}
.post-content>div .science-equation-note{color:#b9c8d6}
.post-content>div .science-variables{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin:14px 0 0}
.post-content>div .science-variables>div{padding:9px 11px;border-radius:8px;background:#ffffff08}
.post-content>div .science-variables dt{font-weight:800;color:#ffbd82}
.post-content>div .science-variables dd{margin:2px 0 0;color:#c1ceda;font-size:.9em}
.post-content>div .science-steps{padding-left:1.5em}
.post-content>div .science-steps li{padding:4px 0}
.post-content>div .science-result{margin:15px 0 0;padding:12px 14px;border-left:4px solid var(--orange);border-radius:0 8px 8px 0;background:#ff8a3212}
.post-content>div .science-safety{margin:14px 0;padding:12px 15px;border-left:4px solid #e58c52;border-radius:0 8px 8px 0;background:#e58c5212}
.post-content>div .science-safety strong{color:#ffc18c}
.post-content>div figure.science-data-figure{margin:1.4em 0}
.post-content>div .science-data-figure>figcaption,.post-content>div figure.science-figure>figcaption{margin:0 0 9px;color:#dce6ef;font-weight:600}
.post-content>div .science-data-table{margin:0}
.post-content>div .science-source{display:block;margin-top:8px;color:#91a5b8;font-size:.84em;font-weight:400}
.post-content>div figure.science-figure{text-align:center}
.post-content>div figure.science-figure img{display:block;max-width:100%;height:auto;max-height:620px;margin:0 auto;object-fit:contain}
.post-content>div figure.science-figure>figcaption{margin-top:9px}
.post-content>div figure.science-figure .science-source{font-style:italic}

/* Stage 5 blocks also appear in the admin live preview */
.admin-preview-content .science-block{margin:1.7em 0;padding:18px 20px;border:1px solid #34485b;border-radius:13px;background:linear-gradient(145deg,#142130,#101923);color:#d5e0ea}
.admin-preview-content .science-block h3{margin:0 0 13px;color:#ffd0a5;font-size:1.12rem}
.admin-preview-content .science-block h4{margin:1.15em 0 .45em;color:#f2f6fa;font-size:.98rem}
.admin-preview-content .science-equation-formula{padding:16px 10px;margin:12px 0;text-align:center;overflow-x:auto;border-radius:9px;background:#080f17;font-size:1.12em}
.admin-preview-content .science-variables{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin:14px 0 0}
.admin-preview-content .science-variables>div{padding:9px 11px;border-radius:8px;background:#ffffff08}
.admin-preview-content .science-variables dt{font-weight:800;color:#ffbd82}
.admin-preview-content .science-variables dd{margin:2px 0 0;color:#c1ceda;font-size:.9em}
.admin-preview-content .science-result,.admin-preview-content .science-safety{margin:14px 0;padding:12px 15px;border-left:4px solid var(--orange);border-radius:0 8px 8px 0;background:#ff8a3212}
.admin-preview-content .science-data-table{width:100%;border-collapse:collapse}
.admin-preview-content .science-data-table th,.admin-preview-content .science-data-table td{padding:9px 12px;border:1px solid var(--line);text-align:left}
.admin-preview-content figure.science-figure{text-align:center}
.admin-preview-content figure.science-figure img{display:block;max-width:100%;height:auto;max-height:620px;margin:0 auto;object-fit:contain}
.admin-preview-content figure.science-figure figcaption{margin-top:9px;color:#dce6ef}
