:root{color-scheme:light;--ink:#1c3c33;--muted:#6b8077;--olive:#70846d;--paper:#f8f7f1;--stroke:#dedfd3;--soft:#eef0e6;--white:#fffefa;font-family:Arial,Helvetica,sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink)}button,input,select{font:inherit}.wrap{max-width:1470px;padding:0 64px;margin:auto}.nav{height:93px;border-bottom:1px solid var(--stroke);display:flex;align-items:center;justify-content:space-between}.brand{color:var(--ink);text-decoration:none;font-size:15px;font-weight:800;letter-spacing:.13em;display:flex;gap:12px;align-items:center}.brand-icon{font-size:25px}.brand small{letter-spacing:normal;font-size:10px;background:#e9eadb;padding:6px;border-radius:6px}.navlink{font-size:13px;color:var(--ink);border-bottom:2px solid var(--ink);text-decoration:none;padding:12px 0}.hero{padding:58px 0 44px;display:flex;justify-content:space-between;gap:24px;min-height:355px}.hero-text{flex:1}.eyebrow{font-size:11px;font-weight:800;letter-spacing:.17em}.hero .eyebrow:first-letter{color:#b48a43}.hero h1{font-family:Georgia,'Times New Roman',serif;font-size:clamp(46px,5.3vw,70px);font-weight:400;letter-spacing:-.045em;line-height:1.05;margin:24px 0}.hero h1 em{color:var(--olive);font-weight:400}.hero p{color:var(--muted);font-size:15px;line-height:1.7;max-width:430px}.hero-art{width:380px;height:275px;position:relative;flex:none}.orbit{position:absolute;top:10px;left:90px;width:225px;height:225px;border:1px solid #d9ddce;border-radius:100%}.sample{position:absolute;padding:15px;background:white;border:1px solid #e9e9df;border-radius:7px;box-shadow:0 18px 30px #203f3320}.sample img{display:block;width:115px;height:75px;object-fit:cover}.s1{top:20px;left:42px;transform:rotate(-12deg)}.s2{top:25px;right:18px;transform:rotate(13deg)}.s3{top:126px;left:140px;transform:rotate(-5deg)}.hero-art>span{position:absolute;bottom:0;left:98px;font-size:9px;color:#a39576;letter-spacing:.2em}.archive{display:grid;grid-template-columns:225px minmax(0,1fr);gap:40px}.sidebar{border-top:1px solid var(--stroke);padding-top:22px}.side-title{display:flex;align-items:center;justify-content:space-between}.sidebar h2{font-size:15px;margin:6px 0 14px}.textbtn{border:0;background:transparent;text-decoration:underline;color:var(--olive);padding:4px;cursor:pointer;font-size:12px}.asidehelp,.note,.searchhint{color:var(--muted);font-size:12px;line-height:1.7;margin:0 0 20px}.regions{display:grid;gap:4px}.regions label,.scopes label{display:flex;align-items:center;gap:10px;font-size:13px;padding:12px 10px;border-radius:6px;cursor:pointer;min-height:39px}.regions label span,.scopes label span{margin-left:auto;color:var(--muted);font-size:11px}.regions label.active,.scopes label:has(input:checked){background:#e5eae0;color:#194e3c;font-weight:600}.regions input,.scopes input{accent-color:#245b49}.sidebar hr{border:0;border-top:1px solid var(--stroke);margin:22px 0}.scopes{display:grid}.inputlabel{font-size:12px;display:block;margin:15px 0 7px}select{width:100%;border:1px solid #ccd4c9;border-radius:6px;background:var(--white);padding:10px;color:var(--ink)}.note{margin-top:16px}.searchbox{background:var(--white);border:1px solid #d0d8cd;border-radius:8px;display:flex;align-items:center;gap:12px;padding:0 15px;height:54px}.searchbox span{font-size:27px;color:var(--olive)}.searchbox input{background:transparent;border:0;outline:0;min-width:0;flex:1;color:var(--ink);font-size:13px}.searchbox kbd{border:1px solid #e0e0d7;border-radius:4px;padding:2px 5px;font-size:12px;color:#a2a89c}.searchhint{margin:9px 0 23px}.resultsbar{display:flex;align-items:baseline;gap:12px;margin-bottom:16px}.resultsbar h2{font-size:26px;font-family:Georgia,serif;font-weight:400;margin:0}.resultsbar span{font-size:12px;color:var(--muted)}.resultsbar button{margin-left:auto;text-decoration:none}#cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.flagcard{padding:0;text-align:left;background:var(--white);border:1px solid #d9dfd2;border-radius:9px;overflow:hidden;cursor:pointer;color:var(--ink);transition:transform .15s,border-color .15s}.flagcard:hover{transform:translateY(-3px);border-color:#6e8f7b}.flagcard:focus-visible{outline:3px solid #567d72;outline-offset:2px}.flagpic{height:118px;display:flex;align-items:center;justify-content:center;background:#f0f1e9;padding:15px}.flagpic img{max-width:100%;width:116px;max-height:78px;object-fit:contain;box-shadow:0 1px 7px #00000010}.placeholder{font-size:11px;color:var(--muted)}.flaginfo{padding:13px;min-height:76px}.flaginfo strong{font-size:12px;display:block;line-height:1.35}.flaginfo div{display:flex;align-items:center;justify-content:space-between;margin-top:11px;gap:6px}.flaginfo small{color:var(--muted);font-size:10px}.flaginfo code{font-size:10px;color:var(--muted);border:1px solid #e5e6db;padding:3px 5px;border-radius:3px}#empty{padding:35px;color:var(--muted);text-align:center}footer{text-align:center;padding:70px 0 30px;font-size:10px;letter-spacing:.1em;color:#859589}dialog{width:min(95vw,620px);max-height:90vh;border:1px solid #dce0d6;border-radius:10px;padding:0;background:var(--white);color:var(--ink);box-shadow:0 25px 100px #13251a50}dialog::backdrop{background:#15271aa8}.close{position:absolute;z-index:2;right:12px;top:12px;border:1px solid var(--stroke);background:white;border-radius:50%;font-size:25px;width:43px;height:43px;cursor:pointer}.profile-flag{background:#eff0e6;height:240px;display:flex;align-items:center;justify-content:center}.profile-flag img{width:min(65%,340px);max-height:175px;object-fit:contain;box-shadow:0 8px 25px #00000015}.profile-body{padding:36px}.profile-body h2{font:normal 48px Georgia,serif;margin:18px 0 28px}.facts{display:grid;grid-template-columns:1fr 1fr;gap:25px;margin-bottom:26px}.facts div small{display:block;color:var(--muted);font-size:12px;letter-spacing:.06em;text-transform:uppercase;margin-bottom:7px}.facts div span{font-size:16px}.profile-body a{color:var(--ink);font-size:14px} @media(max-width:1150px){#cards{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:900px){.wrap{padding:0 22px}.hero-art{width:260px;transform:scale(.8);transform-origin:right center}.archive{gap:22px;grid-template-columns:190px minmax(0,1fr)}#cards{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:650px){.wrap{padding:0 14px}.nav{height:70px}.hero{padding:34px 0;min-height:0}.hero-art{display:none}.hero h1{font-size:44px}.archive{display:block}.sidebar{margin-bottom:20px}.regions{grid-template-columns:repeat(2,minmax(0,1fr))}.regions label{padding:9px 6px}.sidebar hr{margin:15px 0}.scopes{grid-template-columns:1fr 1fr}#cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.flagpic{height:105px}.flaginfo{padding:9px}.profile-body{padding:24px}.profile-body h2{font-size:38px}.facts{gap:16px}}
/* v0.3 — facets, controls and paging */
.search-tools{display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap;margin:12px 0 6px;color:var(--muted);font-size:12px}
.search-tools select{width:auto;min-width:85px;max-width:210px;padding:8px}
.active-filters{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:12px 0;font-size:12px;color:var(--muted)}
.active-filters:empty{display:none}
.filter-chip{background:#e5eae0;color:#275344;padding:6px 8px;border-radius:5px}
.pages{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:center;padding:26px 0 12px}
.pages button{background:var(--white);color:var(--ink);border:1px solid var(--stroke);border-radius:5px;padding:9px 13px;cursor:pointer}
.pages button.current{background:#285e4e;color:white;border-color:#285e4e}
.pages button:disabled{opacity:.4;cursor:default}
.page-caption{font-size:12px;color:var(--muted);margin-left:8px}
#subregion-section[hidden]{display:none}
@media(max-width:650px){.search-tools{justify-content:flex-start}.pages button{padding:7px 10px}}

/* v0.4 appearance facets */
.facet{margin:12px 0;border:1px solid #cdd6ca;background:var(--white);border-radius:7px}
.facet summary{list-style:none;padding:13px;cursor:pointer;font-size:13px;font-weight:600;display:flex;justify-content:space-between;gap:8px;align-items:center}
.facet summary::-webkit-details-marker{display:none}
.facet summary::after{content:"⌄";font-size:17px;color:var(--olive)}
.facet[open] summary::after{content:"⌃"}
.facet summary span{margin-left:auto;color:var(--muted);font-weight:400;font-size:11px}
.facet-content{padding:0 11px 12px;border-top:1px solid var(--stroke)}
.facet-all,.facet-option{display:flex;align-items:center;gap:9px;padding:9px 6px;cursor:pointer;font-size:12px;border-radius:5px}
.facet-all{font-weight:bold;border-bottom:1px solid var(--stroke);margin-bottom:5px}
.facet-options{max-height:300px;overflow:auto}
.facet-option.selected{background:#e6ebdf}
.facet input[type=checkbox]{width:17px;height:17px;accent-color:#235844;flex:none}
.facet input.color-check{appearance:none;-webkit-appearance:none;background:var(--chip-color);border:1px solid #9da99b;border-radius:4px;position:relative}
.facet input.color-check:checked::after{content:"✓";position:absolute;inset:-2px 0 0;text-align:center;font-size:15px;font-weight:900;color:var(--chip-check)}
.profile-flag{background:#eff0e6}
.profile-flag img{box-shadow:none;background:transparent;width:auto;max-width:min(78%,380px);max-height:194px;object-fit:contain}
.profile-body h2{font-family:Georgia,serif;font-weight:400;letter-spacing:-.025em}
#profile{box-shadow:0 25px 90px #13251a4d}

/* v0.5 archive developer tools */
.devtools{background:var(--white);border:1px solid var(--stroke);border-radius:7px;margin:14px 0}
.devtools summary{cursor:pointer;padding:12px 14px;font-size:13px;font-weight:700;display:flex;justify-content:space-between}
.devtools summary span{font-weight:400;color:var(--muted);font-size:12px}
.devtools-body{display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:12px 14px;border-top:1px solid var(--stroke)}
.devtools-body label{display:flex;align-items:center;gap:7px;cursor:pointer;font-size:12px}
.devtools-body input{accent-color:#265946}
.devtools-body small{width:100%;color:var(--muted);font-size:11px;line-height:1.5}

/* v0.6: aligned region choices and consistent uppercase sidebar headings */
.sidebar h2{font-weight:800;letter-spacing:.055em;font-size:13px}
.facet summary{letter-spacing:.045em;font-size:12px}
.regions label{gap:9px}
.regions .region-name{flex:1;min-width:0;text-align:right}
.regions .region-count{margin-left:3px;text-align:right;flex:none;min-width:34px;font-variant-numeric:tabular-nums}
.facet-option input.color-check{background-color:var(--chip-color);border:1px solid #7c8d81;flex-shrink:0}
.facet-option input.color-check:checked{box-shadow:0 0 0 1px #294b3f}
.facet-option input.color-check:focus-visible{outline:2px solid #295e4c;outline-offset:2px}

/* v0.7 — clean, responsive full-size flag lightbox */
.profile-zoom{appearance:none;border:0;padding:0;background:transparent;display:flex;align-items:center;justify-content:center;cursor:zoom-in;max-width:100%;max-height:100%}
.profile-zoom:focus-visible{outline:3px solid #2d6d58;outline-offset:7px;border-radius:4px}
.profile-zoom img{display:block}
#flag-lightbox{width:min(96vw,1350px);max-width:96vw;max-height:95dvh;padding:18px 28px 24px;border:1px solid #dce0d6;border-radius:12px;background:var(--white);overflow:auto}
#flag-lightbox::backdrop{background:rgba(12,29,25,.88)}
.lightbox-close{position:sticky;top:0;margin-left:auto;display:flex;justify-content:center;align-items:center;width:42px;height:42px;background:#fff;border:1px solid #cbd3c8;border-radius:50%;font-size:27px;color:var(--ink);cursor:pointer;z-index:2}
.lightbox-figure{margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px;min-height:min(72dvh,700px)}
.lightbox-figure img{display:block;width:auto;height:auto;max-width:100%;max-height:73dvh;object-fit:contain}
.lightbox-figure figcaption{font-size:14px;color:var(--muted);text-align:center}
@media(max-width:650px){#flag-lightbox{padding:12px;max-height:97dvh}.lightbox-figure{min-height:55dvh}.lightbox-figure img{max-height:72dvh}}

/* v0.7.1 regression fix: the old profile img selector only matched direct
   children. The zoom button added a wrapper, so the image lost its dimensions. */
.profile-flag .profile-zoom{width:auto;height:auto;max-width:85%;max-height:100%;flex:0 1 auto}
.profile-flag .profile-zoom img{display:block;width:auto;height:auto;max-width:100%;max-height:194px;object-fit:contain;box-shadow:none;background:transparent}

/* v0.7.2: native image click target, without intermediary button or frame */
#profile-flag{background:#eff0e6;border:0;box-shadow:none}
#profile-flag .profile-clickable-flag{display:block;width:auto;height:auto;max-width:min(88%,440px);max-height:208px;object-fit:contain;background:none;border:0;box-shadow:none;outline-offset:7px;cursor:zoom-in}
#profile-flag .profile-clickable-flag:focus-visible{outline:3px solid #2d6d58;border-radius:2px}
#flag-lightbox .lightbox-figure img{box-shadow:none;border:0;background:transparent}

/* v0.8: frameless hero flags, fourth personalized flag */
.hero-art .sample{padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}
.hero-art .sample img{width:140px;height:90px;display:block;object-fit:fill;filter:drop-shadow(0 8px 10px rgba(25,45,36,.14))}
.hero-art .s1{top:20px;left:32px;transform:rotate(-10deg)}
.hero-art .s2{top:22px;right:10px;transform:rotate(10deg)}
.hero-art .s3{top:133px;left:79px;transform:rotate(-5deg)}
.hero-art .s4{top:140px;right:0;transform:rotate(8deg)}
.hero-art .adam-flag{display:flex;align-items:center;justify-content:center;width:140px;height:90px;background:#064aa9;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:23px;font-weight:800;white-space:nowrap;letter-spacing:.03em;filter:drop-shadow(0 8px 10px rgba(25,45,36,.14))}
.hero-art>span{left:57px;bottom:-7px}
@media(min-width:651px) and (max-width:900px){.hero-art .sample img,.hero-art .adam-flag{width:128px;height:82px}.hero-art .adam-flag{font-size:19px}.hero-art .s4{right:-10px}}

/* v0.9 reusable primary/alternative flag gallery */
#profile-flag{height:auto;min-height:240px;flex-direction:column;padding:22px 18px;gap:12px}
.flag-gallery{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:185px}
.flag-gallery-main{display:flex;align-items:center;justify-content:center;min-width:0;flex:0 1 390px}
#profile-flag .flag-gallery-main img{display:block;width:auto;height:auto;max-width:100%;max-height:190px;border:0;box-shadow:none;background:none;cursor:zoom-in;object-fit:contain}
.flag-gallery-arrow{border:1px solid #cdd6c9;border-radius:50%;width:36px;height:36px;flex:none;background:#fffffff0;color:#244538;font-size:26px;line-height:1;cursor:pointer;padding:0}
.flag-gallery-arrow:hover{background:#e2ebdf}
.flag-gallery-arrow:focus-visible,.flag-thumb:focus-visible{outline:3px solid #2a7659;outline-offset:3px}
.flag-gallery-thumbnails{display:flex;justify-content:center;gap:10px}
.flag-thumb{padding:4px;background:#fff;border:2px solid transparent;border-radius:5px;cursor:pointer}
.flag-thumb.active{border-color:#2c6851}
.flag-thumb img{display:block;width:58px;height:37px;object-fit:contain;background:transparent;border:0;box-shadow:none}
.flag-variant-label{font-size:12px;color:#5a7265;text-align:center}
.flag-note{grid-column:1/-1;color:#647b70;font-size:12px;line-height:1.45;margin:0}
@media(max-width:650px){#profile-flag{padding:16px 8px}.flag-gallery{gap:4px}.flag-gallery-arrow{width:32px;height:32px}.flag-gallery-main{flex-basis:290px}}

/* v0.10 prominent global reset control */
.top-actions{display:flex;justify-content:flex-end;margin:8px 0 12px}
.reset-all-top{background:#b4232e;color:#fff;font-size:12px;font-weight:800;letter-spacing:.08em;border:1px solid #a61e28;border-radius:6px;padding:11px 20px;cursor:pointer}
.reset-all-top:hover{background:#901b24}
.reset-all-top:focus-visible{outline:3px solid #6a1018;outline-offset:3px}

/* v0.11 unknown metric alerts and direct pagination */
.unverified-metric{display:block;color:#b4232e;font-size:11px;font-weight:700;line-height:1.35;margin-top:8px}
.page-picker-label{display:flex;align-items:center;gap:7px;color:var(--ink);font-size:12px}
.page-picker{width:auto;min-width:92px;background:var(--white);padding:8px;border:1px solid var(--stroke);border-radius:5px;color:var(--ink)}

/* v0.16 Similar Flags archive mode */
.similar-section{margin-top:20px;padding-top:16px;border-top:1px solid var(--stroke)}
.similar-mode{display:flex;align-items:center;gap:9px;margin:12px 0;font-size:12px;font-weight:800;letter-spacing:.05em;cursor:pointer}
.similar-mode input{accent-color:#205744;width:17px;height:17px}
#similar-groups{margin-top:7px}
.similar-results{display:block!important}
.similar-result-group{border-bottom:1px solid var(--stroke);margin:0 0 25px;padding-bottom:24px}
.similar-group-heading{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;color:var(--ink);padding:14px 4px;margin:2px 0 10px;background:transparent;border:0;font-family:Georgia,serif;font-size:24px;cursor:pointer}
.similar-group-heading span:last-child{font:700 20px sans-serif;transition:transform .15s}
.similar-group-heading[aria-expanded="false"] span:last-child{transform:rotate(-90deg)}
.similar-group-cards{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.similar-group-cards[hidden]{display:none}
@media(max-width:1100px){.similar-group-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.similar-group-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.similar-group-heading{font-size:19px}}

/* Discrete blue star-count slider */
.star-section{border-top:1px solid var(--stroke);padding-top:20px;margin-top:22px;margin-bottom:20px}.star-section h2{margin-bottom:16px}.star-slider-head{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted);margin-bottom:12px}.star-slider-head output{font-size:12px;font-weight:700;color:#1769bd;background:#eaf3ff;padding:3px 9px;border-radius:20px}#star-slider{display:block;width:100%;margin:8px 0 12px;cursor:pointer;appearance:none;-webkit-appearance:none;height:7px;border-radius:10px;background:linear-gradient(to right,#2686eb var(--star-progress,0%),#dbe4ef var(--star-progress,0%));outline-offset:5px}#star-slider::-webkit-slider-thumb{-webkit-appearance:none;width:17px;height:17px;border-radius:50%;background:#1675de;border:2px solid white;box-shadow:0 0 0 1px #1675de}#star-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:#1675de;border:2px solid white;box-shadow:0 0 0 1px #1675de}.star-slider-ticks{display:flex;justify-content:space-between;color:var(--muted);font-size:10px;margin-bottom:12px}.star-section .asidehelp{margin-bottom:4px}

/* Visible shared two-page navigation */
.site-nav{display:flex;align-items:center;gap:7px;padding:5px;background:#e9ede4;border:1px solid #dce3d8;border-radius:12px}.site-nav-link{display:inline-flex;align-items:center;gap:9px;padding:11px 17px;text-decoration:none;color:#507165;font-weight:700;font-size:12px;border-radius:9px;letter-spacing:.01em;transition:background .18s,color .18s,box-shadow .18s,transform .18s}.site-nav-link:hover{background:#f7faf4;color:#154633;transform:translateY(-1px)}.site-nav-link.is-active{background:#1c5847;color:white;box-shadow:0 4px 12px #1c58472e}.site-nav-icon{font-size:16px;line-height:1}.site-nav-link:focus-visible{outline:3px solid #2e83c2;outline-offset:2px}@media(max-width:650px){.site-nav{gap:3px;padding:3px}.site-nav-link{padding:9px 8px;font-size:11px;gap:5px}.site-nav-icon{font-size:13px}.brand{font-size:11px;gap:5px}.brand small{font-size:9px;padding:3px}}

/* Archive artwork discovery and contextual bookmark tabs (2026-10-22) */
.emblem-dev-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;width:100%;padding:10px 0}
.emblem-dev-filters label{display:flex;flex-direction:column;align-items:stretch;gap:5px;font-size:12px;font-weight:700;color:var(--ink)}
.emblem-dev-filters select{width:100%;max-width:100%;padding:9px;border:1px solid var(--stroke);border-radius:7px;background:#fff;color:var(--ink)}
.profile-artwork-tabs{display:flex;flex-direction:column;gap:8px;margin:22px -16px 18px 0;align-items:flex-end}
.profile-artwork-section{width:min(100%,380px);display:flex;flex-direction:column;align-items:stretch}
.profile-artwork-tab{align-self:flex-end;border:1px solid #c7d5c9;border-right:0;border-radius:10px 0 0 10px;background:#e5eee6;padding:11px 16px;cursor:pointer;color:#174937;font-weight:800;letter-spacing:.08em;font-size:11px}
.profile-artwork-tab[aria-expanded="true"]{background:#1b5947;color:#fff}
.profile-artwork-preview{padding:12px;border:1px solid #d3ddd2;border-radius:9px 0 0 9px;background:#eff2e8}
.profile-artwork-preview[hidden],.profile-artwork-tabs[hidden]{display:none!important}
.profile-artwork-zoom{display:flex;width:100%;min-height:110px;align-items:center;justify-content:center;padding:14px;border:0;background:#fff;cursor:zoom-in}
.profile-artwork-zoom img{display:block;max-width:100%;max-height:190px;object-fit:contain}
@media(max-width:650px){.emblem-dev-filters{grid-template-columns:1fr}.profile-artwork-tabs{margin-right:-16px}.profile-artwork-section{width:100%}}

/* Artwork bookmarks attach to the outer top-right edge of the profile dialog. */
#profile{overflow:visible;max-height:none}
#profile .profile-scroll{max-height:90vh;overflow-y:auto;overflow-x:hidden;border-radius:10px}
#profile .profile-artwork-tabs{position:absolute;top:74px;left:100%;right:auto;margin:0;display:flex;align-items:flex-start;gap:12px;width:174px;z-index:3}
#profile .profile-artwork-section{width:174px;position:relative}
#profile .profile-artwork-tab{align-self:flex-start;width:174px;text-align:center;border:1px solid #c7d5c9;border-left:0;border-radius:0 9px 9px 0;background:#1b5947;color:white;min-height:43px;padding:10px 8px}
#profile .profile-artwork-tab[aria-expanded="true"]{background:#276f55}
#profile .profile-artwork-preview{position:relative;width:240px;border-radius:0 10px 10px 10px;padding:9px;box-shadow:0 8px 25px #193a2b29}
#profile .profile-artwork-zoom{min-height:90px}
#profile .profile-artwork-zoom img{max-height:155px}
@media(max-width:900px){#profile{width:min(78vw,570px)}#profile .profile-artwork-tabs{width:130px}#profile .profile-artwork-section,#profile .profile-artwork-tab{width:130px}#profile .profile-artwork-tab{font-size:9px}#profile .profile-artwork-preview{width:170px}}
@media(max-width:650px){#profile{width:min(94vw,620px);max-height:90vh;overflow-y:auto}#profile .profile-scroll{max-height:none;overflow:visible}#profile .profile-artwork-tabs{position:relative;top:auto;left:auto;right:auto;width:100%;padding:0 18px 16px;gap:8px}#profile .profile-artwork-section,#profile .profile-artwork-tab{width:100%}#profile .profile-artwork-tab{border-left:1px solid #c7d5c9;border-radius:8px}#profile .profile-artwork-preview{width:100%}}

/* Compact editorial bookmark tabs with a serif face matching country headings. */
#profile .profile-artwork-tabs{gap:9px}
#profile .profile-artwork-tab,#profile .profile-artwork-tab[aria-expanded="true"]{background:#986b34;color:#fff;font-family:Georgia,"Times New Roman",serif;font-weight:400;font-size:13px;letter-spacing:.015em;text-align:left;min-height:34px;padding:6px 10px;border-color:#a37c4b}
#profile .profile-artwork-tab:hover{background:#805726}
#profile .profile-artwork-zoom{padding:9px}
#profile .profile-artwork-preview.saudi-sword-preview,#profile .saudi-sword-preview .profile-artwork-zoom{background:#006c35}
#profile .saudi-sword-preview img{filter:none;box-shadow:none}
@media(max-width:900px){#profile .profile-artwork-tab{font-size:12px;padding:6px 8px}}

/* Ribbon-cut artwork tabs: warm gold swallowtail, accessible full button hit area. */
#profile .profile-artwork-tab,#profile .profile-artwork-tab[aria-expanded="true"]{background:#d99a25;color:#fff;font-family:Georgia,"Times New Roman",serif;font-weight:700;border:0;border-radius:0;clip-path:polygon(0 0,100% 0,100% 27%,calc(100% - 13px) 50%,100% 73%,100% 100%,0 100%);padding:8px 26px 8px 12px;min-height:40px;text-align:left;letter-spacing:.02em}
#profile .profile-artwork-tab:hover,#profile .profile-artwork-tab[aria-expanded="true"]{background:#be7f16}
#profile .profile-artwork-tab:focus-visible{outline:3px solid #184a39;outline-offset:3px}
@media(max-width:650px){#profile .profile-artwork-tab{border-radius:0;clip-path:polygon(0 0,100% 0,100% 27%,calc(100% - 12px) 50%,100% 73%,100% 100%,0 100%)}}

/* Stable archive artwork state: never remove a promised tab after rendering. */
#profile .profile-artwork-zoom:disabled{cursor:default;opacity:1}
#profile .profile-artwork-zoom img[hidden],#profile .artwork-status[hidden]{display:none!important}
#profile .artwork-status{margin:8px 4px 2px;color:#744d28;font-size:12px;line-height:1.45;text-align:center}

/* Developer artwork preview, independent from filter dropdowns. */
.dev-image-test{margin-top:18px;padding:17px;border:1px solid var(--stroke,#d7d9ce);border-radius:9px;background:#f7f8f3}
.dev-image-test h3{font-size:16px;margin:0 0 7px}
.dev-image-test p{font-size:12px;color:var(--muted,#68736f);margin:0 0 13px;line-height:1.5}
.dev-test-choices{display:flex;flex-wrap:wrap;gap:10px 22px;margin-bottom:14px}
.dev-test-choices label{display:inline-flex;align-items:center;gap:7px;font-size:13px}
.dev-test-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.dev-test-actions button{border:1px solid #27634c;background:#27634c;color:#fff;border-radius:6px;padding:9px 14px;cursor:pointer;font-size:12px;font-weight:700}
#test-end{background:transparent;color:#27634c}
#test-status{font-size:12px;color:#546c61}
.image-test-card .flagpic img{max-width:90%;max-height:105px;object-fit:contain}
.test-artwork-type{display:block;font-size:12px;font-weight:600;color:#526d62;margin-top:5px}
.test-image-error{font-size:12px;color:#ad2839;font-weight:600}
.image-test-failed .flagpic{border:1px dashed #cd7070}

/* Saudi isolated white sword: official flag green (#005430), consistently across all image viewers. */
#profile .profile-artwork-preview.saudi-sword-preview,
#profile .saudi-sword-preview .profile-artwork-zoom,
.image-test-card .flagpic.saudi-sword-preview,
#flag-lightbox.saudi-sword-lightbox,
#flag-lightbox.saudi-sword-lightbox .lightbox-figure {background:#005430!important}
#flag-lightbox.saudi-sword-lightbox .lightbox-figure figcaption{color:#fff}


/* Shared preview light/dark capsule; navigation keeps the same page links. */
.nav{gap:16px}.site-nav{margin-left:auto}
.theme-switch{display:inline-flex;align-items:center;gap:2px;padding:4px;background:var(--soft);border:1px solid var(--stroke);border-radius:12px;flex-shrink:0}
.theme-switch button{border:0;border-radius:9px;padding:9px 11px;background:transparent;color:var(--muted);font-size:12px;cursor:pointer;white-space:nowrap}
.theme-switch button[aria-pressed="true"]{background:var(--ink);color:var(--paper);box-shadow:0 1px 5px #0002}
@media(max-width:740px){.nav{height:auto;min-height:80px;flex-wrap:wrap;padding:12px 0}.site-nav{order:3;width:100%;justify-content:center;margin-left:0}.theme-switch{margin-left:auto}.theme-switch button{padding:8px}.theme-switch button span{display:none}}
/* Neutral charcoal preview; flags retain their native colors. */
html[data-theme="dark"]{color-scheme:dark;--ink:#e9ebe9;--muted:#aeb8b4;--olive:#d4decf;--paper:#252a2b;--stroke:#505a5a;--soft:#363e40;--white:#343b3c;background:#252a2b}
html[data-theme="dark"] body{background:var(--paper);color:var(--ink)}
html[data-theme="dark"] .nav,html[data-theme="dark"] .site-nav,html[data-theme="dark"] footer{color:var(--ink)}
html[data-theme="dark"] .brand small{background:#465350;color:#eaf3eb}
html[data-theme="dark"] .site-nav-link{color:var(--ink)}
html[data-theme="dark"] .site-nav-link.is-active{background:#e2e8e5;color:#1c3530}
html[data-theme="dark"] .hero h1 em{color:#fff}
html[data-theme="dark"] .hero h1{color:#cfd6d2}
html[data-theme="dark"] .sample,html[data-theme="dark"] .flagcard,html[data-theme="dark"] .sidebar,html[data-theme="dark"] .searchbox,html[data-theme="dark"] .profile-body,html[data-theme="dark"] .profile-scroll,html[data-theme="dark"] .facet-content{background-color:var(--white);color:var(--ink)}
html[data-theme="dark"] .flagpic,html[data-theme="dark"] .profile-flag,html[data-theme="dark"] .flag-gallery-main,html[data-theme="dark"] .flag-lightbox{background-color:#42494a}
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] button:not(.theme-switch button):not(.primary-button):not(.site-nav-link){color:var(--ink)}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),html[data-theme="dark"] select{background:#343c3d;border-color:#687372;color:#f2f4f2}
html[data-theme="dark"] .regions label.active,html[data-theme="dark"] .scopes label:has(input:checked),html[data-theme="dark"] .facet-option.selected{background:#475b55;color:#fff}
html[data-theme="dark"] .note,html[data-theme="dark"] .asidehelp,html[data-theme="dark"] .searchhint,html[data-theme="dark"] .flaginfo small{color:#b5c0bb}
html[data-theme="dark"] #profile,html[data-theme="dark"] #flag-lightbox{background:#353d3e;color:#f2f5f2}
html[data-theme="dark"] #profile a,html[data-theme="dark"] #download{color:#a6dfce}


/* Dark navigation: inactive destinations remain legible against the pale capsule. */
html[data-theme="dark"] .site-nav{background:#394242;border-color:#596563}
html[data-theme="dark"] .site-nav-link:not(.is-active){color:#f0f4f1;background:transparent}
html[data-theme="dark"] .site-nav-link:not(.is-active):hover{background:#4a5955;color:#fff}
html[data-theme="dark"] .site-nav-link.is-active{background:#dcebe3;color:#173b31}
/* Flag images must not inherit the dark canvas backdrop or sidebars.
   The profile's outer panel stays a separate surface. */
html[data-theme="dark"] #profile-flag .flag-gallery-main,
html[data-theme="dark"] #profile-flag .flag-gallery-main img,
html[data-theme="dark"] #profile-flag .profile-clickable-flag,
html[data-theme="dark"] #profile-flag .profile-zoom,
html[data-theme="dark"] #profile-flag .profile-zoom img{background:transparent!important}
html[data-theme="dark"] .profile-flag{background:#e9eee6}

/* Keep page choices near the center-right and appearance switch at the far edge. */
@media(min-width:741px){.nav .site-nav{margin-left:auto}.nav .theme-switch{margin-left:clamp(24px,4vw,90px)}}


/* Flagvex brand artwork: responsive, transparent PNGs; no distortion. */
.brand-art{gap:9px;min-width:0;flex-shrink:0}
.brand-art .brand-mascot{display:block;width:40px;height:40px;object-fit:contain;flex:none}
.brand-art .brand-wordmark{display:block;width:155px;height:48px;object-fit:contain;object-position:left center;flex:none}
.brand-art .brand-wordmark-fallback{font-size:15px;font-weight:800;letter-spacing:.13em;color:var(--ink)}
.brand-art img[hidden],.brand-art .brand-wordmark-fallback[hidden]{display:none}
.brand-art small{flex:none}
@media(max-width:850px){.brand-art .brand-mascot{width:32px;height:32px}.brand-art .brand-wordmark{width:125px;height:38px}.brand-art{gap:6px}}
@media(max-width:390px){.brand-art .brand-wordmark{width:105px}.brand-art small{font-size:9px}}

/* Three-zone desktop header: brand left, navigation exactly centered, theme right. */
@media(min-width:741px){
 .nav{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;column-gap:16px}
 .nav .brand-art{grid-column:1;justify-self:start}
 .nav .site-nav{grid-column:2;justify-self:center;margin-left:0}
 .nav .theme-switch{grid-column:3;justify-self:end;margin-left:0}
}
/* Use full available width for the navigation bar, leaving content width unchanged. */
@media(min-width:741px){
 .wrap:has(> .nav){max-width:none;padding-inline:clamp(20px,2.2vw,40px)}
}

/* Larger Flagvex brand artwork on desktop, while preserving three-zone alignment. */
@media(min-width:851px){
 .nav{height:116px}
 .brand-art .brand-mascot{width:80px;height:80px}
 .brand-art .brand-wordmark{width:310px;height:96px}
}

/* Archive: compact off-canvas filter panel on phones only. */
.mobile-filter-controls,.mobile-filter-heading{display:none}
@media(max-width:650px){
 .mobile-filter-controls{display:flex;justify-content:flex-start;margin:0 0 16px}
 .mobile-filter-toggle{display:inline-flex;align-items:center;gap:12px;border:1px solid var(--stroke);border-radius:10px;background:var(--white);color:var(--ink);padding:12px 16px;font-weight:700;cursor:pointer;box-shadow:0 2px 8px #0000000a}
 .mobile-filter-toggle span:last-child{font-size:22px;line-height:16px}
 .archive .sidebar{position:fixed;left:0;top:0;bottom:0;width:min(82vw,340px);max-width:calc(100vw - 54px);z-index:2100;overflow-y:auto;overscroll-behavior:contain;background:var(--paper);color:var(--ink);margin:0;padding:18px 18px 36px;box-shadow:12px 0 32px #0005;transform:translateX(-110%);visibility:hidden;transition:transform .24s ease,visibility .24s}
 .archive .sidebar.is-open{transform:translateX(0);visibility:visible}
 .mobile-filter-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 18px;padding-bottom:12px;border-bottom:1px solid var(--stroke);font-size:18px}
 .mobile-filter-heading button{border:1px solid var(--stroke);background:var(--white);color:var(--ink);font-size:25px;width:40px;height:40px;border-radius:9px;cursor:pointer}
 .filter-backdrop:not([hidden]){position:fixed;inset:0;display:block;background:#0009;z-index:2090}
 body.filters-open{overflow:hidden}
 html[data-theme="dark"] .archive .sidebar{background:#303839;color:#f3f5f3}
 html[data-theme="dark"] .mobile-filter-toggle,html[data-theme="dark"] .mobile-filter-heading button{background:#394847;color:#f3f5f3;border-color:#667671}
}
@media(prefers-reduced-motion:reduce){.archive .sidebar{transition:none}}

/* Mobile archive toolbar and independently sliding Developer Tools drawer. */
@media(min-width:651px){.mobile-filter-heading{display:none}}
@media(max-width:650px){
 .mobile-filter-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:16px}
 .mobile-filter-controls .mobile-filter-toggle{width:100%;min-width:0;height:46px;padding:6px 5px;display:flex;align-items:center;justify-content:center;gap:5px;font-size:12px;white-space:nowrap;border-radius:9px;box-shadow:none}
 .mobile-filter-controls .mobile-filter-toggle span:last-child{font-size:17px}
 .mobile-filter-controls .mobile-reset{background:#b62435;color:white;border-color:#b62435}
 .mobile-filter-controls .mobile-reset:hover{background:#9f1c2d}
 .results>.top-actions{display:none}
 .results>.searchhint{margin-top:10px}
 #dev-tools.devtools{position:fixed;left:0;top:0;bottom:0;z-index:2100;display:block;width:min(82vw,340px);max-width:calc(100vw - 54px);overflow-y:auto;overscroll-behavior:contain;margin:0;padding:18px 18px 36px;background:var(--paper);color:var(--ink);border:0;box-shadow:12px 0 32px #0005;transform:translateX(-110%);visibility:hidden;transition:transform .24s ease,visibility .24s}
 #dev-tools.devtools.is-open{transform:translateX(0);visibility:visible}
 #dev-tools.devtools .mobile-filter-heading{display:flex}
 #dev-tools.devtools>summary{display:none}
 #dev-tools.devtools .devtools-body{display:block}
 html[data-theme="dark"] #dev-tools.devtools{background:#303839;color:#f3f5f3}
}
@media(prefers-reduced-motion:reduce){#dev-tools.devtools{transition:none}}

/* Developer Tools artwork test: correct light/dark surfaces and legible labels in desktop and mobile drawers. */
html[data-theme="dark"] #dev-tools .dev-image-test{
 background:#394445;color:#f0f4f2;border-color:#64736e;
}
html[data-theme="dark"] #dev-tools .dev-image-test h3,
html[data-theme="dark"] #dev-tools .dev-test-choices label{color:#f0f4f2}
html[data-theme="dark"] #dev-tools .dev-image-test p,
html[data-theme="dark"] #dev-tools #test-status{color:#c5d2cc}
html[data-theme="dark"] #dev-tools #test-end{color:#a6dfce;border-color:#728f83}

/* Authenticated identity remains to the left of appearance controls. */
.site-identity{display:flex;align-items:center;gap:7px;margin-left:auto;min-width:0;max-width:180px;text-decoration:none;color:var(--ink);font-size:12px}.site-identity[hidden],.site-identity-avatar[hidden]{display:none!important}.site-identity-avatar{width:28px;height:28px;border-radius:50%;object-fit:cover;background:#dadde2;flex:none}.site-identity-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media(max-width:740px){.site-identity{max-width:100px}.site-identity-avatar{width:24px;height:24px}}

/* Keep desktop identity and appearance on one horizontal row; never wrap. */
@media(min-width:741px){.nav{grid-template-columns:minmax(0,1fr) auto minmax(200px,1fr)}.nav .site-identity{grid-column:3;grid-row:1;justify-self:end;margin-right:154px;max-width:clamp(60px,10vw,175px)}.nav .theme-switch{grid-column:3;grid-row:1;justify-self:end;position:relative;z-index:1}.nav .site-nav{grid-column:2;grid-row:1}.nav .brand-art{grid-column:1;grid-row:1}}
@media(max-width:740px){.nav .site-identity{order:1;margin-left:auto}.nav .theme-switch{order:2;margin-left:0}.nav .site-nav{order:3}}
#answer-format optgroup{font-weight:400}

/* v0.3.5 dark-mode archive modal controls */
html[data-theme="dark"] #profile .close,html[data-theme="dark"] #flag-lightbox .lightbox-close,html[data-theme="dark"] #profile .flag-gallery-arrow{color:#123c31!important;background:#f4faf5!important;border:1px solid #7e978b!important;opacity:1!important}
html[data-theme="dark"] #profile .close:hover,html[data-theme="dark"] #flag-lightbox .lightbox-close:hover,html[data-theme="dark"] #profile .flag-gallery-arrow:hover{background:#d7f4e3!important}
#flag-lightbox .lightbox-gallery-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:5;background:#f6faf7;color:#194938;border:1px solid #82978e;border-radius:50%;width:44px;height:44px;cursor:pointer;font-size:30px;display:flex;align-items:center;justify-content:center}
#flag-lightbox .lightbox-gallery-arrow.prev{left:12px}#flag-lightbox .lightbox-gallery-arrow.next{right:12px}
#flag-lightbox .lightbox-gallery-arrow[hidden]{display:none!important}
@media(max-width:650px){#flag-lightbox .lightbox-gallery-arrow{width:36px;height:36px;font-size:24px}}

/* Public policy and attribution links, accessible across themes and screen sizes. */
.legal-footer-content,.legal-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:11px;padding:18px 10px;color:var(--muted);font-size:12px;text-align:center}.legal-links{display:flex;flex-wrap:wrap;gap:10px 20px;align-items:center;justify-content:center}.legal-links a{color:var(--ink);text-decoration:underline;text-underline-offset:3px}.legal-credit{color:var(--muted);font-size:11px}.legal-page{max-width:840px;margin:48px auto 90px;padding:0 20px;line-height:1.75}.legal-page h1{font:normal clamp(34px,5vw,52px) Georgia,serif;color:var(--ink)}.legal-page p{margin:18px 0;color:var(--ink)}html[data-theme="dark"] .legal-links a{color:#b4ecd5}html[data-theme="dark"] .legal-page{color:#f1f5f2}@media(max-width:650px){.legal-page{margin:22px auto 55px;padding:0 14px}.legal-links{gap:10px 15px}}
