/* Institutional chrome for HTTP-served tools. Keep every selector prefixed. */
:where(body.vd-tool-shell-page) {
  --vd-shell-bg: #f4f7fb;
  --vd-shell-ink: #172033;
  --vd-shell-muted: #5e6a7d;
  --vd-shell-line: #d8e0eb;
  --vd-shell-accent: #2b6cb0;
  --vd-shell-accent-strong: #174a7a;
  --vd-shell-dark: #172033;
  margin: 0;
  min-width: 320px;
  background: var(--vd-shell-bg);
  color: var(--vd-shell-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.vd-tool-shell-page *,
.vd-tool-shell-page *::before,
.vd-tool-shell-page *::after { box-sizing: border-box; }
.vd-tool-shell-page a { color: inherit; }
.vd-tool-shell-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.vd-tool-shell-skip { position: fixed; top: -4rem; left: 1rem; z-index: 2000000; padding: .7rem 1rem; border-radius: .5rem; background: var(--vd-shell-dark); color: #fff; font-weight: 700; text-decoration: none; }
.vd-tool-shell-skip:focus { top: 1rem; }
.vd-tool-shell-service { padding: .35rem max(1rem, calc((100vw - 1440px) / 2)); background: #e7eef7; color: #40526b; font-size: .72rem; letter-spacing: .02em; }
.vd-tool-shell-header { position: relative; z-index: 20; display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: center; padding: .75rem max(1rem, calc((100vw - 1440px) / 2)); background: var(--vd-shell-dark); color: #fff; box-shadow: 0 3px 16px rgba(23, 32, 51, .18); }
.vd-tool-shell-brand { display: inline-flex; align-items: center; gap: .6rem; min-width: max-content; color: #fff; text-decoration: none; }
.vd-tool-shell-brand strong { display: block; font-size: 1rem; letter-spacing: .01em; }
.vd-tool-shell-brand small { display: block; margin-top: .1rem; color: #b8c7da; font-size: .68rem; }
.vd-tool-shell-mark { display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border: 1px solid #8fb7df; border-radius: .65rem; color: #dceeff; font-size: .72rem; font-weight: 800; }
.vd-tool-shell-nav { display: flex; justify-content: flex-end; align-items: center; gap: .9rem; flex-wrap: wrap; color: #eaf2fb; font-size: .78rem; }
.vd-tool-shell-nav a { padding: .32rem .1rem; text-decoration: none; }
.vd-tool-shell-nav a:hover, .vd-tool-shell-nav a:focus-visible { color: #9ed0ff; text-decoration: underline; }
.vd-tool-shell-feedback-link { border: 1px solid #6f9cc8; border-radius: 999px; background: transparent; color: #eaf2fb; padding: .38rem .7rem; font: inherit; cursor: pointer; }
.vd-tool-shell-feedback-link:hover, .vd-tool-shell-feedback-link:focus-visible { background: rgba(255,255,255,.12); color: #fff; }
.vd-tool-shell-login { padding: .38rem .7rem !important; border: 1px solid #6f9cc8; border-radius: 999px; }
.vd-tool-shell-main { position: relative; z-index: 1; min-height: 0; background: var(--vd-shell-bg); }
.vd-tool-operational { position: relative; min-width: 0; }
.vd-tool-operational-legal { display: block; margin: 2rem auto 0; padding: 1.25rem 1rem; border-top: 1px solid var(--vd-shell-line); color: inherit; font-size: .8rem; line-height: 1.5; text-align: center; }
.vd-tool-operational-legal p { margin: .35rem auto; }
.vd-tool-operational--cielo { display: flex; flex-direction: column; height: min(780px, calc(100dvh - 190px)); min-height: 520px; overflow: hidden; }
.vd-tool-operational--cielo .app-main { flex: 1 1 auto; min-height: 0; height: auto; }
.vd-tool-operational--cielo .map-container, .vd-tool-operational--cielo #map { min-height: 0; }
.vd-tool-shell-footer { position: relative; z-index: 5; padding: 2rem max(1rem, calc((100vw - 1440px) / 2)) 1rem; background: var(--vd-shell-dark); color: #e8eef7; font-size: .76rem; }
.vd-tool-shell-footer-grid { display: grid; grid-template-columns: minmax(12rem, 1.5fr) repeat(3, minmax(9rem, 1fr)); gap: 1.5rem; max-width: 1440px; margin: 0 auto; }
.vd-tool-shell-footer-grid section { display: grid; align-content: start; gap: .38rem; }
.vd-tool-shell-footer-grid p { margin: .35rem 0 0; color: #aebbd0; line-height: 1.5; }
.vd-tool-shell-footer-grid h2 { margin: 0 0 .3rem; color: #9fc8ef; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; }
.vd-tool-shell-footer-grid a { color: #e8eef7; text-decoration: none; }
.vd-tool-shell-footer-grid a:hover, .vd-tool-shell-footer-grid a:focus-visible { color: #a8d3ff; text-decoration: underline; }
.vd-tool-shell-footer-brand { color: #fff; font-size: .95rem; }
.vd-tool-shell-footer-bottom { display: flex; justify-content: space-between; gap: 1rem; max-width: 1440px; margin: 1rem auto 0; padding-top: .8rem; border-top: 1px solid rgba(255,255,255,.12); color: #91a0b5; font-size: .68rem; }
.vd-tool-shell-consent { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: calc(var(--vd-shell-tool-bottom, 0px) + max(1rem, env(safe-area-inset-bottom))); z-index: 899999; display: grid; gap: .7rem; width: min(28rem, calc(100vw - 2rem)); padding: .85rem 1rem; border: 1px solid #b7c8dc; border-radius: .7rem; background: #f8fbff; color: #32445d; box-shadow: 0 8px 28px rgba(23, 32, 51, .2); font-size: .73rem; line-height: 1.45; }
.vd-tool-shell-consent[hidden], .vd-tool-shell-feedback-pop[hidden], .vd-tool-shell-toast[hidden] { display: none; }
.vd-tool-shell-consent-actions, .vd-tool-shell-feedback-actions { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.vd-tool-shell-consent-actions button, .vd-tool-shell-consent-actions a, .vd-tool-shell-feedback-actions button { border: 1px solid #8aa9c9; border-radius: .45rem; background: #e8f2fd; color: #21466e; padding: .42rem .65rem; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.vd-tool-shell-consent-close { padding: .1rem .35rem !important; border: 0 !important; background: transparent !important; color: inherit !important; font-size: 1.1rem; }
.vd-tool-shell-feedback-pop { position: absolute; top: calc(100% + .5rem); right: max(1rem, calc((100vw - 1440px) / 2)); z-index: 900001; width: min(24rem, calc(100vw - 2rem)); max-height: min(75dvh, 34rem); overflow: auto; padding: 1rem; border: 1px solid #b7c8dc; border-radius: .75rem; background: #fff; color: #26364d; box-shadow: 0 12px 34px rgba(23, 32, 51, .25); }
.vd-tool-shell-feedback-pop h2 { display: flex; justify-content: space-between; gap: .75rem; margin: 0 0 .8rem; font-size: .95rem; }
.vd-tool-shell-feedback-pop h2 button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 1.25rem; line-height: 1; }
.vd-tool-shell-feedback-pop form { display: grid; gap: .38rem; }
.vd-tool-shell-feedback-pop label { font-size: .72rem; font-weight: 700; }
.vd-tool-shell-feedback-pop input, .vd-tool-shell-feedback-pop select, .vd-tool-shell-feedback-pop textarea { width: 100%; min-height: 2.25rem; border: 1px solid #c5d2e0; border-radius: .4rem; background: #fff; color: #26364d; padding: .45rem .55rem; font: inherit; }
.vd-tool-shell-feedback-actions { margin-top: .3rem; }
.vd-tool-shell-feedback-actions button[type="submit"] { background: var(--vd-shell-accent); color: #fff; }
.vd-tool-shell-toast { position: fixed; left: 50%; bottom: calc(var(--vd-shell-tool-bottom, 0px) + 1rem + max(1rem, env(safe-area-inset-bottom))); z-index: 900002; transform: translateX(-50%); width: min(30rem, calc(100vw - 2rem)); padding: .7rem .9rem; border-radius: .55rem; background: #172033; color: #fff; box-shadow: 0 6px 20px rgba(23, 32, 51, .24); font-size: .76rem; }
body[data-vd-shell-theme="dark"], body[data-vd-shell-theme="obsidian"] { --vd-shell-bg: #0b1220; --vd-shell-ink: #f5f8fc; --vd-shell-line: #33465f; --vd-shell-dark: #080d16; --vd-shell-accent: #3b82d0; --vd-shell-accent-strong: #70a9e6; }
body[data-vd-shell-theme="dark"] .vd-tool-shell-service, body[data-vd-shell-theme="obsidian"] .vd-tool-shell-service { background: #152238; color: #c5d5e8; }
body[data-vd-shell-theme="dark"] .vd-tool-shell-feedback-pop, body[data-vd-shell-theme="obsidian"] .vd-tool-shell-feedback-pop { background: #111b2b; border-color: #405773; color: #edf4fd; }
body[data-vd-shell-theme="dark"] .vd-tool-shell-feedback-pop input, body[data-vd-shell-theme="dark"] .vd-tool-shell-feedback-pop select, body[data-vd-shell-theme="dark"] .vd-tool-shell-feedback-pop textarea, body[data-vd-shell-theme="obsidian"] .vd-tool-shell-feedback-pop input, body[data-vd-shell-theme="obsidian"] .vd-tool-shell-feedback-pop select, body[data-vd-shell-theme="obsidian"] .vd-tool-shell-feedback-pop textarea { background: #0b1422; border-color: #405773; color: #edf4fd; }
body[data-vd-shell-theme="dark"] .vd-tool-shell-consent, body[data-vd-shell-theme="obsidian"] .vd-tool-shell-consent { background: #111b2b; border-color: #405773; color: #edf4fd; }
@media (prefers-color-scheme: dark) {
  body[data-vd-tool="cielo"]:not([data-vd-shell-theme]) { --vd-shell-bg: #0b1220; --vd-shell-ink: #f5f8fc; --vd-shell-line: #33465f; --vd-shell-dark: #080d16; --vd-shell-accent: #3b82d0; --vd-shell-accent-strong: #70a9e6; }
  body[data-vd-tool="cielo"]:not([data-vd-shell-theme]) .vd-tool-shell-service { background: #152238; color: #c5d5e8; }
  body[data-vd-tool="cielo"]:not([data-vd-shell-theme]) .vd-tool-shell-feedback-pop { background: #111b2b; border-color: #405773; color: #edf4fd; }
  body[data-vd-tool="cielo"]:not([data-vd-shell-theme]) .vd-tool-shell-feedback-pop input, body[data-vd-tool="cielo"]:not([data-vd-shell-theme]) .vd-tool-shell-feedback-pop select, body[data-vd-tool="cielo"]:not([data-vd-shell-theme]) .vd-tool-shell-feedback-pop textarea { background: #0b1422; border-color: #405773; color: #edf4fd; }
  body[data-vd-tool="cielo"]:not([data-vd-shell-theme]) .vd-tool-shell-consent { background: #111b2b; border-color: #405773; color: #edf4fd; }
}
@media (max-width: 980px) {
  .vd-tool-shell-header { gap: .55rem .9rem; }
  .vd-tool-shell-nav { justify-content: flex-end; gap: .7rem; }
  .vd-tool-operational--cielo { height: calc(100dvh - 190px); min-height: 480px; }
}
@media (max-width: 600px) {
  .vd-tool-shell-service { padding-inline: 1rem; font-size: .66rem; }
  .vd-tool-shell-header { padding: .7rem 1rem; }
  .vd-tool-shell-brand small { display: none; }
  .vd-tool-shell-nav { gap: .45rem; font-size: .72rem; }
  .vd-tool-shell-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 1rem; }
  .vd-tool-shell-footer-grid section:first-child { grid-column: 1 / -1; }
  .vd-tool-shell-footer-bottom { flex-direction: column; gap: .3rem; }
}
