/* NUAR QR Business 1.3.1 — visual polish.
   Presentation only: no modifications to QR generators, account state or payment flows. */
body[data-nuar-theme="gold"]{
  --nuar-accent:#c6a46b;--nuar-surface:#161514;--nuar-ink:#f1e9dc;
  --nuar-secondary:#c3b9a9;--nuar-cardline:rgba(211,178,126,.25);
  --nuar-cardshadow:0 9px 26px rgba(0,0,0,.22);
  --bg:#0e0d0d;--text:#f1e9dc;--muted:#c3b9a9;--line:rgba(211,178,126,.25);
  --gold:#c6a46b;--mint:#c6a46b;--blue:#d8bd8e;
  background:radial-gradient(ellipse at 76% 13%,#201c17 0,transparent 55%),#0e0d0d!important;
  color:var(--text)!important;
}
body[data-nuar-theme="classic"]{
  --nuar-accent:#88b8ec;--nuar-surface:#192841;--nuar-ink:#f1f5ff;
  --nuar-secondary:#c3d0e5;--nuar-cardline:rgba(137,177,227,.25);
  --nuar-cardshadow:0 8px 24px rgba(4,13,33,.19);
  --bg:#111d32;--text:#f1f5ff;--muted:#c3d0e5;--line:rgba(137,177,227,.25);
  --gold:#88b8ec;--mint:#88b8ec;--blue:#88b8ec;
  background:radial-gradient(ellipse at 75% 10%,#213857 0,transparent 55%),#111d32!important;
  color:var(--text)!important;
}
body[data-nuar-theme="light"]{
  --nuar-accent:#426c9d;--nuar-surface:#ffffff;--nuar-ink:#1b2e48;
  --nuar-secondary:#4a5c72;--nuar-cardline:#d6dfe8;
  --nuar-cardshadow:0 4px 16px rgba(27,48,76,.065);
  --bg:#f6f5f1;--text:#1b2e48;--muted:#4a5c72;--line:#d6dfe8;
  --gold:#426c9d;--mint:#426c9d;--blue:#426c9d;
  background:#f6f5f1!important;
  color:var(--text)!important;
}
body[data-nuar-theme] .glow{opacity:0!important}
body[data-nuar-theme]::after{opacity:.025!important}
/* Compact theme control: important but secondary to the actual tools. */
body[data-nuar-theme] .nuar-theme-picker{
  max-width:420px;margin:8px auto 4px!important;padding:3px 8px!important;
  display:flex;justify-content:center;align-items:center;gap:5px;
}
body[data-nuar-theme] .nuar-theme-picker label{
  font:700 10px/1.2 var(--f)!important;letter-spacing:.08em;
  text-transform:uppercase;color:var(--nuar-secondary)!important;
}
body[data-nuar-theme] .nuar-theme-picker button{
  min-width:0;min-height:38px;padding:8px 9px!important;
  border:1px solid var(--nuar-cardline)!important;border-radius:10px!important;
  font:600 11.5px/1.2 var(--f)!important;letter-spacing:0!important;
  background:transparent!important;color:var(--nuar-ink)!important;
  box-shadow:none!important;white-space:nowrap;
}
body[data-nuar-theme] .nuar-theme-picker button[aria-pressed="true"]{
  outline:1px solid var(--nuar-accent)!important;outline-offset:1px!important;
  border-color:var(--nuar-accent)!important;
  background:color-mix(in srgb,var(--nuar-accent) 14%,transparent)!important;
}
body[data-nuar-theme] .nuar-theme-picker button:focus-visible{
  outline:3px solid var(--nuar-accent)!important;outline-offset:2px!important;
}
/* The original PNG is white text on black. Screen blending masks black on dark
   themes; inverted multiply masks the black rectangle on the light theme.
   Keep the same original local asset, so all modes stay fully offline. */
body[data-nuar-theme] .hero{
  isolation:auto!important;position:relative;
  padding:1px 0 0!important;margin:0 auto!important;
  background:transparent!important;color:var(--nuar-ink)!important;
}
body[data-nuar-theme] .brandword{
  display:block;max-width:100%!important;
  width:min(410px,84vw)!important;height:auto!important;
  margin:0 auto 0!important;opacity:1!important;
  border:0!important;box-shadow:none!important;
  mix-blend-mode:screen!important;
  filter:drop-shadow(0 2px 10px rgba(0,0,0,.12))!important;
}
body[data-nuar-theme="light"] .brandword{
  mix-blend-mode:multiply!important;
  filter:invert(1) contrast(1.14)!important;
}
body[data-nuar-theme] .hero .subtitle{
  font:500 13px/1.5 var(--f)!important;
  letter-spacing:0!important;text-transform:none!important;
  max-width:520px!important;margin:-3px auto 0!important;
  padding:0 9px;color:var(--nuar-secondary)!important;
}
body[data-nuar-theme] .hero::after{
  margin:16px auto 0!important;max-width:115px!important;
  opacity:.38!important;background:linear-gradient(90deg,transparent,var(--nuar-accent),transparent)!important;
}
body[data-nuar-theme] .noir-lamp{display:none!important}
body[data-nuar-theme="gold"] .noir-lamp{
  display:block!important;
  right:-19px!important;top:-34px!important;
  transform:scale(.72);transform-origin:top right;
  opacity:.85;z-index:4!important;
}
body[data-nuar-theme="gold"] .noir-lamp.swing{animation:lampSwing 1.65s cubic-bezier(.2,.75,.25,1)}
/* Installation prompt is only appropriate in the browser, never installed PWA. */
.installbar[hidden],.installbtn[hidden]{display:none!important}
body[data-nuar-theme] .installbar{margin:11px 0 0!important}
body[data-nuar-theme] .installbtn{
  font:700 11px/1.25 var(--f)!important;
  text-transform:none!important;letter-spacing:0!important;
  border:1px solid var(--nuar-cardline)!important;border-radius:10px!important;
  padding:9px 15px!important;color:var(--nuar-ink)!important;
  background:transparent!important;
}
body[data-nuar-theme] .syncstate{display:none!important}
body[data-nuar-theme] #nb-entry{
  display:inline-flex;min-height:42px!important;margin:10px auto 0!important;
  padding:9px 16px!important;border-radius:11px!important;
  border:1px solid var(--nuar-cardline)!important;
  background:color-mix(in srgb,var(--nuar-accent) 8%,transparent)!important;
  color:var(--nuar-ink)!important;box-shadow:none!important;
  font:700 12px/1.25 var(--f)!important;letter-spacing:.015em!important;
  max-width:calc(100vw - 48px);
}
body[data-nuar-theme] #nb-test-label{
  color:var(--nuar-secondary)!important;opacity:.85;
  font:600 10px/1.35 var(--f)!important;letter-spacing:.025em!important;
  margin-top:5px!important;
}
body[data-nuar-theme] #nb-entry:focus-visible{
  outline:3px solid var(--nuar-accent)!important;outline-offset:2px;
}
/* Home grid: preserve familiar 2x3 arrangement; improve spacing and contrast. */
body[data-nuar-theme] #modeCards{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px!important;margin:20px 0 24px!important;
}
/* Tool screens must never show the homepage card grid. */
body.tools-used[data-nuar-theme] #modeCards{display:none!important}
body[data-nuar-theme] #modeCards .feat{
  display:flex!important;flex-direction:column;align-items:flex-start;
  min-width:0;min-height:133px;
  box-sizing:border-box!important;
  padding:16px 14px!important;border-radius:14px!important;
  border:1px solid var(--nuar-cardline)!important;
  background:var(--nuar-surface)!important;color:var(--nuar-ink)!important;
  box-shadow:var(--nuar-cardshadow)!important;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
body[data-nuar-theme="gold"] #modeCards .feat{
  background:linear-gradient(145deg,#1b1917,#131211)!important;
}
body[data-nuar-theme="classic"] #modeCards .feat{
  background:linear-gradient(145deg,#20304b,#17243c)!important;
}
body[data-nuar-theme="light"] #modeCards .feat{
  background:#fff!important;
}
body[data-nuar-theme] #modeCards .feat b{
  margin:0 0 12px!important;color:var(--nuar-accent)!important;
  font:800 11px/1.2 var(--f)!important;letter-spacing:.17em!important;
}
body[data-nuar-theme] #modeCards .feat span{
  display:block;max-width:100%;
  margin:0 0 5px!important;
  font:700 clamp(15px,3.9vw,18px)/1.26 var(--serif,Georgia,serif)!important;
  letter-spacing:0!important;color:var(--nuar-ink)!important;
  overflow-wrap:normal;word-break:normal;
}
/* Clear sans-serif headings distinguish practical themes; Gold retains serif luxury. */
body[data-nuar-theme="classic"] #modeCards .feat span,
body[data-nuar-theme="light"] #modeCards .feat span{
  font-family:var(--f)!important;font-weight:800!important;
  font-size:clamp(14px,3.65vw,17px)!important;letter-spacing:-.025em!important;
}
body[data-nuar-theme] #modeCards .feat small{
  display:block;font:500 12px/1.45 var(--f)!important;
  color:var(--nuar-secondary)!important;letter-spacing:0!important;
  overflow-wrap:anywhere;
}
body[data-nuar-theme] #modeCards .feat:focus-visible{
  outline:3px solid var(--nuar-accent)!important;outline-offset:3px!important;
}
body[data-nuar-theme] #modeCards .feat:active{transform:scale(.985)}
body[data-nuar-theme="gold"] #modeCards .feat:hover{border-color:#c6a46b!important}
body[data-nuar-theme="classic"] #modeCards .feat:hover{border-color:#88b8ec!important}
body[data-nuar-theme="light"] #modeCards .feat:hover{border-color:#426c9d!important}
/* The whole app, including tool forms, shares the correct theme palette. */
body[data-nuar-theme] #tool .card,
body[data-nuar-theme] #tool .scan-extra-pane{
  color:var(--nuar-ink)!important;
}
body[data-nuar-theme="gold"] #tool .card{
  background:#171615!important;border-color:var(--nuar-cardline)!important;box-shadow:0 7px 20px rgba(0,0,0,.15)!important;
}
body[data-nuar-theme="classic"] #tool .card{
  background:#192841!important;border-color:var(--nuar-cardline)!important;box-shadow:0 7px 20px rgba(2,12,31,.16)!important;
}
body[data-nuar-theme="light"] #tool .card{
  background:#fff!important;border-color:var(--nuar-cardline)!important;box-shadow:var(--nuar-cardshadow)!important;
}
body[data-nuar-theme] #tool .scan-note,
body[data-nuar-theme] #tool .scan-extra-pane small{
  color:var(--nuar-secondary)!important;
}
body[data-nuar-theme] #tool .tool-backbar{
  border-color:var(--nuar-cardline)!important;
}
body[data-nuar-theme] #tool .tool-back,
body[data-nuar-theme] #tool .tab{
  color:var(--nuar-ink)!important;
  border-color:var(--nuar-cardline)!important;
}
body[data-nuar-theme] #tool .tab.active{
  color:var(--bg)!important;
  background:var(--nuar-accent)!important;
  border-color:var(--nuar-accent)!important;
  box-shadow:none!important;
}
body[data-nuar-theme] #tool .tab.active b,
body[data-nuar-theme] #tool .tab.active span{
  color:var(--bg)!important;
}
body[data-nuar-theme] #tool .tab small,
body[data-nuar-theme] #tool .tool-backlabel{
  color:var(--nuar-secondary)!important;
}
body[data-nuar-theme] #tool .tab.active small{
  color:var(--bg)!important;opacity:.8;
}
body[data-nuar-theme="light"] #tool .tool-backbar{
  background:linear-gradient(180deg,#f6f5f1 75%,transparent)!important;
}
body[data-nuar-theme="classic"] #tool .tool-backbar{
  background:linear-gradient(180deg,#111d32 75%,transparent)!important;
}
body[data-nuar-theme="gold"] #tool .tool-backbar{
  background:linear-gradient(180deg,#0e0d0d 75%,transparent)!important;
}
/* Keep legal notice small and discoverable, with readable links. */
body[data-nuar-theme] .footer{
  margin:0 auto 28px!important;
  max-width:720px!important;
  padding:12px 6px 0!important;
  border-top:1px solid var(--nuar-cardline)!important;
  background:transparent!important;
}
body[data-nuar-theme] .nuar-legal-brief{
  font:500 11.5px/1.5 var(--f)!important;
  color:var(--nuar-secondary)!important;opacity:.87;
  max-width:610px!important;
}
body[data-nuar-theme] .nuar-footer-links a{
  color:var(--nuar-accent)!important;
  font:600 11.5px/1.5 var(--f)!important;
}
/* Minimum mobile readable sizes and no horizontal scroll. */
@media(max-width:480px){
  body[data-nuar-theme] .nuar-theme-picker{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));
    max-width:350px;margin:9px auto 3px!important;gap:7px!important;padding:2px 0!important;
  }
  body[data-nuar-theme] .nuar-theme-picker label{display:none!important}
  body[data-nuar-theme] .nuar-theme-picker button{padding:8px 3px!important;font-size:11px!important}
  body[data-nuar-theme] .hero{padding:0!important}
  body[data-nuar-theme] .brandword{width:min(340px,82vw)!important}
  body[data-nuar-theme] .hero .subtitle{font-size:12.5px!important;line-height:1.48!important}
  body[data-nuar-theme] #modeCards .feat{
    padding:14px 12px!important;min-height:131px;
  }
  body[data-nuar-theme] #modeCards .feat span{font-size:clamp(15px,4vw,17px)!important}
  body[data-nuar-theme] #modeCards .feat small{font-size:11.7px!important}
  body[data-nuar-theme="gold"] .noir-lamp{right:-15px!important;top:-25px!important;transform:scale(.58)}
}
@media(max-width:355px){
  body[data-nuar-theme] #modeCards{gap:8px!important}
  body[data-nuar-theme] #modeCards .feat{padding:12px 9px!important}
  body[data-nuar-theme] #modeCards .feat span{font-size:14.5px!important}
  body[data-nuar-theme] #modeCards .feat small{font-size:11px!important}
}
@media(prefers-reduced-motion:reduce){
  body[data-nuar-theme] #modeCards .feat{transition:none!important}
}
