/* Shared navigation: plain editorial rows, not cards. Loaded after page styles. */
.identity-topics{display:grid;gap:0;margin-top:28px}
.identity-topics>.eyebrow{font:9px/1.7 var(--mono);letter-spacing:1.1px;color:var(--muted);margin:0 0 15px}
.identity-topics>a,.identity-topics>a:hover,.identity-topics>a[aria-current]{min-height:53px;padding:14px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;font-size:15px;font-weight:400;line-height:1.6;color:var(--muted)}
.identity-topics>a:hover,.identity-topics>a[aria-current]{color:var(--accent)}
.identity-topics>a[aria-current]:before{display:none}
.identity-topics>a>.topic-state,.identity-topics>a[aria-current]>.topic-state{display:block;width:auto;height:auto;flex:0 0 auto;border-radius:0;background:transparent;color:inherit;font-size:22px;line-height:1}
.identity-topics>a:focus-visible,.identity-cta:focus-visible,.portfolio-filters a:focus-visible,.article-page .breadcrumb a:focus-visible,.article-page .article-header>.eyebrow>a:focus-visible{outline:2px solid var(--focus);outline-offset:4px}
.identity-cta{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:8px;box-shadow:none;font-weight:400}
.identity-cta:hover{background:var(--accent-soft);color:var(--accent);border-color:var(--accent);box-shadow:none}
/* The switch shares the desktop rail and mobile bottom navigation. */
.rail-nav>.theme-toggle{position:relative;display:grid;place-items:center;flex-shrink:0;width:44px;height:46px;padding:0;border:1px solid transparent;border-radius:12px;background:transparent;color:var(--muted);cursor:pointer}
.rail-nav>.theme-toggle[hidden]{display:none}
.rail-nav>.theme-toggle:hover{background:var(--accent-soft);color:var(--accent);border-color:var(--line)}
.rail-nav>.theme-toggle:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.theme-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.theme-toggle .theme-moon{display:none}
html[data-theme="light"] .theme-toggle .theme-sun{display:none}
html[data-theme="light"] .theme-toggle .theme-moon{display:block}
.theme-toggle>span{position:absolute;right:calc(100% + 13px);white-space:nowrap;background:#202b35;color:#e8f2f6;border:1px solid #394a56;border-radius:5px;padding:6px 9px;font-size:11px;visibility:hidden;opacity:0;z-index:20;pointer-events:none}
.theme-toggle:hover>span,.theme-toggle:focus-visible>span{visibility:visible;opacity:1}
@media(max-width:1200px) and (min-width:761px){.identity-topics>a{font-size:14px}.identity-topics>.eyebrow{font-size:8px;letter-spacing:.65px}.rail-nav>.theme-toggle{width:39px}}
@media(max-width:760px){.rail-nav{gap:8px;padding:6px 10px;max-width:calc(100% - 24px)}.rail-nav>a,.rail-nav>.theme-toggle{width:43px;height:43px;flex:0 0 43px;border-radius:10px}.theme-toggle>span{display:none}}
/* White day palette. Images retain their original colours and contrast. */
html[data-theme="light"]{color-scheme:light;--paper:#fff;--ink:#202d36;--muted:#5b6973;--line:#dce3e7;--accent:#176478;--accent-hover:#114d5f;--accent-soft:#eaf2f5;--accent-tint:#dcebf0;--on-accent:#fff;--accent-on-dark:#8dddee;--surface:#f5f7f8;--canvas:#f3f5f7;--focus:#1b6c81;--control-bg:#f5f7f8;--control-border:#cdd8df;--control-text:#52636e;--control-hover:#edf2f5;--control-active:#e7f1f4;--control-accent:#176478;--control-selected:#114d5f;--glass-fill:linear-gradient(115deg,#eef4f6,#e8f0f3);--glass-line:#bbcfd6;--glass-shadow:inset 0 1px 0 #fff,0 2px 6px #1c3a4910}
html[data-theme="light"] body.dark-preview{background:var(--canvas);color:var(--ink)}
html[data-theme="light"] ::selection{background:#cee6ed;color:#143f4e}
html[data-theme="light"] .identity-panel,html[data-theme="light"] .preview-main,html[data-theme="light"] .rail-nav{background:#fff;border-color:var(--line);box-shadow:0 4px 24px #253b4906}
html[data-theme="light"] .identity-tools .icon-button{background:var(--surface);border-color:var(--line);color:var(--muted)}
html[data-theme="light"] .identity-tools .icon-button:hover{color:var(--accent);border-color:var(--accent)}
html[data-theme="light"] .identity-status>.mono{color:var(--muted)}
html[data-theme="light"] .identity-status>span:last-child{color:#426c5b}
html[data-theme="light"] .identity-status i{background:#45826a}
html[data-theme="light"] .rail-nav>a{color:var(--muted)}
html[data-theme="light"] .rail-nav>a:hover,html[data-theme="light"] .rail-nav>a[aria-current]{background:var(--accent-soft);border-color:#c5d8df;box-shadow:none;color:var(--accent)}
html[data-theme="light"] .preview-home{background:radial-gradient(ellipse at 15% 20%,#eaf4f688,transparent 65%)}
html[data-theme="light"] .preview-home h1>span{background-image:linear-gradient(105deg,#176478,#4e588d)}
html[data-theme="light"] .preview-home-top>.eyebrow,html[data-theme="light"] .preview-home-copy>p,html[data-theme="light"] .preview-about-link,html[data-theme="light"] .preview-section-heading .eyebrow,html[data-theme="light"] .preview-section-heading>a,html[data-theme="light"] .preview-story-category>a,html[data-theme="light"] .preview-rss-symbol,html[data-theme="light"] .preview-rss p:last-child{color:var(--muted)}
html[data-theme="light"] .preview-section-heading>a,html[data-theme="light"] .preview-story-image,html[data-theme="light"] .preview-landscape{border-color:var(--line)}
html[data-theme="light"] .preview-story-image>span{color:#bfeafa}
html[data-theme="light"] .preview-footer{background:#fafbfc}
html[data-theme="light"] .footer-signature .brand-mark{color:var(--ink)}
html[data-theme="light"] .footer-signature small,html[data-theme="light"] .preview-footer-bottom{color:var(--muted)}
html[data-theme="light"] .preview-footer .back-top{border-color:var(--line)}
html[data-theme="light"] .preview-footer .back-top:hover{background:var(--accent-soft)}
html[data-theme="light"] .button-outline{background:#fff;border-color:#c5d1d9;color:var(--ink)}
html[data-theme="light"] .button-outline:hover,html[data-theme="light"] .icon-button:hover{background:var(--accent-soft)}
html[data-theme="light"] .article-page .breadcrumb a,html[data-theme="light"] .article-page .breadcrumb>span,html[data-theme="light"] .article-page .article-header>.eyebrow,html[data-theme="light"] .article-page .article-header>.eyebrow>span{color:var(--muted)}
html[data-theme="light"] .article-page .breadcrumb a:hover{color:var(--accent)}
html[data-theme="light"] .article-page .article-header>.eyebrow>a{background:var(--surface);border-color:var(--line);color:var(--accent);box-shadow:none}
html[data-theme="light"] .author-avatar{background:var(--accent-soft)}
html[data-theme="light"] .article-toc>a{border-color:var(--line)}
html[data-theme="light"] .article-toc>a.is-active,html[data-theme="light"] .article-toc>a:hover{border-color:var(--accent)}
html[data-theme="light"] .prose{color:#34434e}
html[data-theme="light"] .prose a{color:var(--accent)}
html[data-theme="light"] .prose blockquote{background:#f0f6f8;color:#34434e}
html[data-theme="light"] .prose code,html[data-theme="light"] .prose th{background:#edf2f5;color:#263d4b}
html[data-theme="light"] .prose pre{background:#f5f7f8;color:#263d4b;border-color:var(--line)}
html[data-theme="light"] .prose pre code{background:transparent;color:inherit}
html[data-theme="light"] .category-label{color:var(--accent)}
html[data-theme="light"] .about-outro{background:#edf4f6;color:var(--ink)}
html[data-theme="light"] .about-outro h2,html[data-theme="light"] .about-outro p{color:var(--ink)}
html[data-theme="light"] .search-form{border-color:#a3b4bf}
html[data-theme="light"] .search-form>input::placeholder,html[data-theme="light"] .portfolio-search input::placeholder{color:var(--muted)}
html[data-theme="light"] .portfolio-search{background:var(--surface);border-color:var(--line)}
html[data-theme="light"] .portfolio-heading h1 svg{color:#686095;stroke:currentColor}
html[data-theme="light"] .portfolio-filters a{color:var(--muted)}
html[data-theme="light"] .portfolio-filters a:hover{background:var(--surface);border-color:var(--line);color:var(--accent)}
html[data-theme="light"] .portfolio-filters a[aria-current="page"]{background:var(--accent-soft);color:var(--accent);border-color:#bed1d9;box-shadow:none}
html[data-theme="light"] .portfolio-filters a[aria-current="page"] .filter-indicator{color:inherit}
html[data-theme="light"] .portfolio-card{background:#fff;border-color:var(--line);box-shadow:0 3px 12px #253b4905}
html[data-theme="light"] .portfolio-card:hover,html[data-theme="light"] .portfolio-card:focus-within{background:#f8fbfc;border-color:#a7c0cb}
html[data-theme="light"] .portfolio-image img{filter:none}
html[data-theme="light"] .portfolio-card .bookmark-button{background:#fffffff0;border-color:#e0e8ed;color:var(--accent)}
html[data-theme="light"] .portfolio-card .bookmark-button:hover,html[data-theme="light"] .portfolio-card .bookmark-button[aria-pressed=true]{background:#e5f1f5;color:var(--accent)}
html[data-theme="light"] .portfolio-empty{background:var(--surface)}
html[data-theme="light"] .pagination>a{border-color:#c5d1d9}
html[data-theme="light"] .pagination>a:hover{background:var(--accent-soft);color:var(--accent)}
html[data-theme="light"] .pagination>a[aria-current]{background:var(--accent);color:#fff}
html[data-theme="light"] .saved-dialog{background:#fff;border-color:var(--line);box-shadow:0 24px 100px #20303b40}
html[data-theme="light"] .preview-mobile-header .brand-mark{color:var(--ink)}
html[data-theme="light"] .preview-mobile-header .menu-toggle>span{background:var(--ink)}
html[data-theme="light"] .mobile-nav{background:#fff;border-color:var(--line);box-shadow:0 12px 32px #20303b20}
@media(max-width:760px){html[data-theme="light"] .rail-nav{background:#fffffff2;border-color:#cbd8df;box-shadow:0 5px 24px #20303b14}}
@media print{html[data-theme] body.dark-preview,html[data-theme] .preview-main{background:white;color:black;box-shadow:none}html[data-theme] .prose{color:black}}

html[data-theme="light"] .portfolio-search button:hover{background:var(--accent-soft);color:var(--accent)}
