/*
Theme Name: Portal Light
Version: 1.0.0
*/
:root { --ink:#112441; --muted:#465974; --paper:#f6f8fb; --line:#dce4ef; --gold:#ffd279; }
* { box-sizing:border-box; }
body { margin:0; background:var(--paper); color:var(--ink); font:1rem/1.65 system-ui,sans-serif; }
a { color:#17467c; text-underline-offset:.2em; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline:3px solid #b76b00; outline-offset:4px; }
img { max-width:100%; height:auto; }
.shell { width:min(82rem, calc(100% - 2rem)); margin-inline:auto; }
.site-head { background:white; border-bottom:1px solid var(--line); }
.head-inner { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.75rem 2rem; padding-block:.85rem; }
.brand { font-weight:850; font-size:1.45rem; color:var(--ink); text-decoration:none; }
.brand span { color:#9c5500; }
.site-head ul { list-style:none; display:flex; flex-wrap:wrap; gap:.45rem 1rem; margin:0; padding:0; }
.site-head a { text-decoration:none; }
.site-head a:hover { text-decoration:underline; }
main { padding-block:clamp(1.5rem,5vw,4rem); }
.hero { background:#112441; color:#eef4ff; border-radius:1rem; padding:clamp(1.4rem,5vw,4rem); }
.hero h1 { font-size:clamp(2rem,5vw,4rem); line-height:1.07; max-width:19ch; margin:0; }
.hero h1 span { display:block; color:var(--gold); }
.hero p { max-width:52ch; margin-block:1rem 1.35rem; }
.cta { display:inline-block; padding:.65rem 1rem; border-radius:.5rem; background:var(--gold); color:var(--ink); font:inherit; font-weight:700; border:0; cursor:pointer; text-decoration:none; }
section.home-section { margin-block:clamp(1.75rem,5vw,3.5rem); }
h1,h2,h3 { line-height:1.18; }
.topics,.post-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:.9rem; }
.tile,.reading { background:white; border:1px solid var(--line); border-radius:.75rem; padding:1rem; }
.tile h2,.tile h3 { font-size:1.15rem; margin:.2rem 0; }
.tile time,.meta { color:var(--muted); font-size:.9rem; }
.reading { max-width:65rem; margin-inline:auto; padding:clamp(1rem,4vw,3rem); overflow-wrap:anywhere; }
.reading table { display:block; overflow-x:auto; max-width:100%; }
.author { margin-top:2rem; border-top:1px solid var(--line); padding-top:1rem; }
.site-foot { background:#112441; color:#dce6f7; }
.site-foot a { color:#edf4ff; }
.foot-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap:1.3rem 2rem; padding-block:2.5rem; }
.foot-grid h2 { color:white; margin:0 0 .75rem; font-size:1rem; }
.foot-grid p { margin:0; }
.foot-grid ul { margin:0; padding:0; list-style:none; }
.foot-grid li { margin:.35rem 0; }
.foot-end { border-top:1px solid #364762; padding-block:1rem; font-size:.88rem; }
.skip-link { position:absolute; top:-10rem; }
.skip-link:focus { top:0; padding:.6rem; background:white; z-index:10; }
.market iframe { width:100%; border:0; height:440px; }
.archive-grid { margin-top:1.5rem; grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr)); gap:1.25rem; }
.archive-card { padding:0; overflow:hidden; }
.card-media { display:block; background:#e8edf5; aspect-ratio:16/9; }
.card-media img { display:block; width:100%; height:100%; object-fit:cover; }
.card-body { padding:1rem 1.15rem; }
.card-body p { margin:.55rem 0 0; }
.author { display:flex; align-items:flex-start; gap:1rem; padding:1rem; border:1px solid var(--line); border-radius:.75rem; background:var(--paper); }
.author img { border-radius:50%; flex:none; }
.author h2,.author p { margin:.25rem 0; }
.author h2 { font-size:1.1rem; }
.brand { display:flex; align-items:center; gap:.55rem; }
.brand img { display:block; max-width:220px; max-height:50px; width:auto; }
.portal-nav .menu-item { position:relative; }
.portal-nav .sub-menu { display:none; }
.portal-nav .menu-item:hover > .sub-menu,.portal-nav .menu-item:focus-within > .sub-menu { display:block; position:absolute; background:white; min-width:13rem; padding:.5rem; border:1px solid var(--line); z-index:3; }
.portal-nav .sub-menu a { display:block; padding:.3rem; }
@media (max-width: 640px) { .portal-nav .menu-item:hover > .sub-menu,.portal-nav .menu-item:focus-within > .sub-menu { position:static; } }

/* Main navigation */
.site-head { border-bottom: 1px solid #dce4ef; box-shadow: 0 3px 16px #1124410a; }
.site-head .head-inner { gap: .7rem 1.6rem; padding-block: .8rem; }
.site-head .portal-nav > ul { gap: .25rem; padding: .25rem; border: 1px solid #e0e7f1; border-radius: .95rem; background: #f3f6fb; }
.site-head .portal-nav li > a { display: flex; align-items: center; min-height: 42px; padding: .42rem .85rem; border-radius: .65rem; color: #203857; font-size: .9rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
.site-head .portal-nav li > a:hover, .site-head .portal-nav li > a:focus-visible { background: #e2eaf6; color: #112441; text-decoration: none; }
.site-head .portal-nav :is(.current-menu-item,.current-menu-ancestor,.current-menu-parent) > a, .site-head .portal-nav a[aria-current='page'] { background: #112441; color: #fff; box-shadow: inset 0 -3px #e8a020; }
.portal-nav .menu-item-has-children > a::after { content: ''; width: .35rem; height: .35rem; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin: -.2rem 0 0 .5rem; }
.site-head .portal-nav .sub-menu { border-radius: .7rem; box-shadow: 0 8px 20px #11244117; }
@media (max-width: 720px) {
    .site-head .portal-nav { width: 100%; }
    .site-head .portal-nav > ul { align-items: flex-start; }
    .site-head .portal-nav li > a { min-height: 44px; padding-inline: .65rem; }
    .site-head .portal-nav .menu-item:hover > .sub-menu, .site-head .portal-nav .menu-item:focus-within > .sub-menu { position: static; min-width: 0; }
}
