:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:#e7eef9;background:#0d1421;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:radial-gradient(ellipse at top right,#152b42,#0d1421 65%)}.top{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:30px max(24px,calc((100vw - 1170px)/2));border-bottom:1px solid #263950;background:#101b2bd9}.eyebrow{font-size:11px;letter-spacing:.18em;color:#64bbd7;font-weight:800}.top h1{font-size:clamp(25px,4vw,38px);letter-spacing:-.05em;margin:8px 0}.top h1 span{color:#4cc2a5}.top p,.identity,p{color:#a4b5c9}.top p{margin:0}.identity{white-space:nowrap;font-size:13px}.shell{max-width:1210px;margin:25px auto;padding:0 20px}.panel{background:#142135;border:1px solid #2a3d55;border-radius:17px;padding:23px;margin-bottom:18px;box-shadow:0 8px 36px #0002}.panel h2{margin:0 0 15px;font-size:20px;letter-spacing:-.025em}.panel h3{font-size:15px}.narrow{max-width:680px;margin:45px auto}.small{font-size:12px;line-height:1.65;color:#98aec6}.hidden{display:none!important}label{display:flex;flex-direction:column;gap:7px;font-weight:650;font-size:13px;margin:12px 0;color:#cfdef0}label:has(input[type=checkbox]){flex-direction:row;align-items:center;font-weight:400}input,textarea{width:100%;background:#0e1929;border:1px solid #34475f;border-radius:9px;padding:11px 12px;font:inherit;color:#edf4ff;outline:none}input:focus,textarea:focus{border-color:#52b9bc;box-shadow:0 0 0 3px #52b9bc22}input[type=checkbox]{width:auto}button{cursor:pointer;border:0;border-radius:9px;background:#45bd9b;color:#071f20;padding:11px 15px;font:inherit;font-weight:750}button:hover{filter:brightness(1.09)}button:disabled{opacity:.6;cursor:wait}.ghost{background:transparent;border:1px solid #42566f;color:#dce9f7}.danger{background:#632c38;color:white}.toolbar,.sectionhead,.dialoghead,.dialogactions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px}.toolbar{margin:0 0 17px}.toolbar nav{display:flex;gap:7px;flex-wrap:wrap}.tab{background:#1b2b40;color:#d6e2f1}.tab.active{background:#4cbf9e;color:#102524}.metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:19px}.metric{background:#15243a;border:1px solid #34465b;border-radius:15px;padding:20px}.metric .value{font-size:26px;font-weight:800;letter-spacing:-.05em;margin-top:6px}.metric .name{font-size:12px;color:#96acc2}.columns{display:grid;grid-template-columns:1fr 1fr;gap:17px}.village-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(285px,1fr));gap:12px}.vcard{padding:17px;border:1px solid #31465e;border-radius:13px;background:#102033}.vcard h3{margin:0 0 3px}.vcard .coord{font-size:12px;color:#6bd2ba}.vcard .levels{margin:13px 0;font-size:13px;line-height:1.8;color:#c2d2e4}.vcard .actions{display:flex;justify-content:space-between;gap:8px;align-items:center}.data-row{display:flex;justify-content:space-between;gap:10px;padding:11px 0;border-bottom:1px solid #2a3c51;font-size:13px}.data-row strong{font-variant-numeric:tabular-nums}.tag{display:inline-block;background:#254a4c;color:#a4efda;border-radius:6px;font-size:11px;padding:4px 8px}#status{min-height:22px;color:#87e9c6}#status.error{color:#ff9999}dialog{width:min(760px,95vw);max-height:92vh;border:1px solid #4b617b;background:#152439;color:#e7eef9;border-radius:18px;padding:25px}dialog::backdrop{background:#040c18d9}.fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 15px}.dialogactions{margin-top:15px}.importlabel{display:inline-block;margin-left:10px;background:#263c52;border-radius:9px;padding:11px 15px;cursor:pointer}.importlabel input{display:none}@media(max-width:760px){.top{padding:25px 20px;align-items:start}.identity{display:none}.metrics{grid-template-columns:repeat(2,1fr)}.columns{grid-template-columns:1fr}.fields{grid-template-columns:1fr 1fr}.panel{padding:18px}.metric{padding:14px}.metric .value{font-size:22px}}@media(max-width:410px){.fields{grid-template-columns:1fr}.metrics{grid-template-columns:1fr 1fr}}
/* v0.2 palettes and import interfaces */
body.theme-beige{--bg:#f1e8d7;--surface:#fffaf0;--border:#d5bea0;--ink:#352619;--muted:#715943;--accent:#97632c;--sub:#f4ead9;--danger:#ad3432}
body.theme-red{--bg:#110d0e;--surface:#23191a;--border:#563236;--ink:#f3e7e7;--muted:#b8a0a1;--accent:#cb3d41;--sub:#302022;--danger:#e65757}
body.theme-beige,body.theme-red{background:var(--bg)!important;color:var(--ink)!important}
body.theme-beige .top,body.theme-red .top{background:var(--surface)!important;border-color:var(--border)!important}
body.theme-beige .panel,body.theme-beige .vcard,body.theme-beige .metric,body.theme-red .panel,body.theme-red .vcard,body.theme-red .metric{background:var(--surface)!important;border-color:var(--border)!important;color:var(--ink)!important}
body.theme-beige .top p,body.theme-beige .identity,body.theme-beige p,body.theme-beige label,body.theme-beige .small,body.theme-red .top p,body.theme-red .identity,body.theme-red p,body.theme-red label,body.theme-red .small{color:var(--muted)}
body.theme-beige .data-row,body.theme-red .data-row{border-color:var(--border)}
body.theme-beige .metric .value,body.theme-beige .vcard h3,body.theme-beige h1,body.theme-beige h2,body.theme-beige h3,body.theme-red .metric .value,body.theme-red .vcard h3,body.theme-red h1,body.theme-red h2,body.theme-red h3{color:var(--ink)}
body.theme-beige .top h1 span,body.theme-red .top h1 span,body.theme-beige .eyebrow,body.theme-red .eyebrow{color:var(--accent)}
body.theme-beige input,body.theme-beige textarea,body.theme-beige select,body.theme-red input,body.theme-red textarea,body.theme-red select{background:var(--sub)!important;border:1px solid var(--border)!important;color:var(--ink)!important}
body.theme-beige button:not(.ghost):not(.tab),body.theme-red button:not(.ghost):not(.tab),body.theme-beige .tab.active,body.theme-red .tab.active{background:var(--accent)!important;color:#fff!important}
body.theme-beige .tab,body.theme-beige button.ghost,body.theme-red .tab,body.theme-red button.ghost{background:var(--sub)!important;border:1px solid var(--border)!important;color:var(--ink)!important}
.themebar{margin-top:8px}.themebar label{font-size:12px;display:flex;flex-direction:row;gap:10px;align-items:center}.themebar select{padding:7px 11px;border-radius:8px}
.previewbox{padding:12px 2px;line-height:1.6}.importrow{padding:10px;border-bottom:1px solid var(--border)}.importrow ul{margin:6px 0}.importrow em{color:var(--accent)}
#sync textarea,#intel textarea{min-height:180px;width:100%;resize:vertical}.toolbar nav{display:flex;flex-wrap:wrap;gap:7px}

/* v0.2.1 contrast improvements and readable figures */
.metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.metric-detail{margin-top:10px;font-size:12px;font-weight:650;line-height:1.7;overflow-wrap:anywhere;color:var(--muted,#a4b5c9)}
#armyCaution{margin-top:-10px;margin-bottom:20px}
body.theme-beige .vcard .coord{color:#67401d!important;font-weight:800}
body.theme-beige .vcard .levels{color:#352619!important}
body.theme-beige .vcard .tag{background:#66411c!important;color:#fff9ee!important;font-weight:800}
body.theme-red .vcard .coord{color:#ffb5a7!important;font-weight:800}
body.theme-red .vcard .levels{color:#f4e2e2!important}
body.theme-red .vcard .tag{background:#a83e42!important;color:#fff!important;font-weight:800}
body.theme-beige .metric .name{color:#67401d!important}
body.theme-red .metric .name{color:#e5babc!important}
@media(max-width:980px){.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){.metrics{grid-template-columns:1fr}}
