:root{
  --ui:Inter,"Segoe UI",Arial,sans-serif;
  --serif:Georgia,"Times New Roman",serif;
  --text:#0a1c3c;
  --muted:#59708c;
  --blue:#175be6;
  --cyan:#22a7df;
  --gold:#a87325;
  --focus:#005fcc;

  --control-h:48px;
  --control-r:16px;
  --control-border:rgba(61,103,160,.22);
  --control-hover:rgba(34,96,201,.72);
  --control-bg:rgba(255,255,255,.38);

  --panel-bg:rgba(255,255,255,.58);
  --panel-bg-soft:rgba(255,255,255,.38);
  --panel-border:rgba(102,129,169,.28);

  --sidebar-bg:rgba(248,252,255,.74);
  --scene:none;
}

/* 4.21 — baza zmian NFZ i LIOCZ 7.3.3; interfejs zachowany z 4.20 */
.search-panel{z-index:120}
.search-panel.conversation-active{display:grid}
.error-rule-results{z-index:320}
.answer-panel{z-index:2}
.answer-body{
  display:grid;
  gap:4px;
}
.demo-response{
  max-width:900px;
  color:var(--muted);
  font-family:"Segoe UI",Inter,Arial,sans-serif;
  font-size:14px;
  font-weight:400;
  line-height:1.65;
}
.demo-response p{margin:0 0 11px;font-weight:400}
.demo-response p:last-child{margin-bottom:0}
.demo-response h3{
  margin:18px 0 7px;
  color:var(--text);
  font-size:14px;
  font-weight:750;
  line-height:1.35;
}
.demo-response h3:first-child{margin-top:0}
.demo-response ul,.demo-response ol{
  margin:5px 0 13px;
  padding-left:24px;
}
.demo-response li{
  margin:5px 0;
  padding-left:2px;
  font-weight:400;
}
.chat-message{margin-bottom:16px}
.chat-message-label{font-size:9px}
.chat-bubble{padding:15px 17px}
.chat-message-user .chat-bubble>p{
  font-size:13px;
  font-weight:500;
  line-height:1.5;
}
.chat-composer{
  margin:2px 22px 18px 91px;
  padding:13px 14px 11px;
  border:1px solid color-mix(in srgb,var(--blue) 25%,var(--panel-border));
  border-radius:16px;
  background:color-mix(in srgb,var(--panel-bg) 78%,transparent);
}
.chat-composer[hidden]{display:none}
.chat-composer>label{
  display:block;
  margin-bottom:7px;
  color:var(--text);
  font-size:10px;
  font-weight:800;
}
.chat-composer-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 42px;
  align-items:end;
  gap:9px;
}
.chat-composer textarea{
  width:100%;
  min-height:52px;
  max-height:150px;
  resize:none;
  overflow-y:auto;
  border:1px solid var(--panel-border);
  border-radius:12px;
  padding:10px 12px;
  color:var(--text);
  background:var(--panel-bg-soft);
  font:13px/1.45 "Segoe UI",Inter,Arial,sans-serif;
}
.chat-composer button{
  width:42px;
  height:42px;
  border:0;
  border-radius:50%;
  color:#fff;
  background:linear-gradient(135deg,var(--blue),var(--cyan));
  font-size:22px;
}
.chat-composer button:disabled{opacity:.45}
.chat-composer small{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:9px;
  line-height:1.4;
}
@media(max-width:640px){
  .demo-response{font-size:13px;line-height:1.58}
  .chat-bubble{padding:12px 13px}
  .chat-composer{margin:0 12px 14px;padding:11px}
  .chat-composer-row{grid-template-columns:minmax(0,1fr) 40px}
  .chat-composer button{width:40px;height:40px}
}

/* Źródła i kompaktowa ocena odpowiedzi. */
.answer-sources{max-width:900px;margin:10px 0 0;padding-top:9px;border-top:1px solid var(--panel-border);font-size:10px}
.answer-sources summary{cursor:pointer;color:var(--text);font-weight:800}
.answer-sources ul{margin:8px 0 0;padding-left:20px}
.answer-sources a{color:var(--blue)}
.answer-feedback{max-width:900px;margin:10px 0 0;padding-top:9px;border-top:1px solid var(--panel-border);font-size:10px}
.answer-feedback>b{display:block;color:var(--muted);margin-bottom:7px;font-size:9.5px;font-weight:700}
.feedback-actions{display:flex;gap:6px;flex-wrap:wrap}
.feedback-button{appearance:none;border:1px solid color-mix(in srgb,var(--blue) 30%,var(--panel-border));border-radius:999px;background:var(--panel-bg-soft);color:var(--text);padding:5px 9px;font:700 9px/1.1 var(--ui);cursor:pointer}
.feedback-button:hover{border-color:var(--blue)}
.feedback-button:disabled{opacity:.55;cursor:default}
.feedback-form{margin-top:10px}
.feedback-form label{display:grid;gap:7px;color:var(--muted);font-size:9px}
.feedback-form textarea{width:100%;resize:vertical;border:1px solid var(--panel-border);border-radius:10px;background:var(--panel-bg-soft);color:var(--text);padding:9px;font:10px/1.4 var(--ui)}
.feedback-submit{margin-top:8px;background:var(--blue);color:#fff}
.feedback-status{min-height:14px;margin:6px 0 0;font-size:9px;color:var(--muted)}
html[data-theme="dark"]{
  --text:#f4f8ff;
  --muted:#b9c7da;
  --blue:#668aff;
  --cyan:#2ab8e8;
  --gold:#d8b36d;
  --focus:#ffd15a;

  --control-border:rgba(94,130,181,.32);
  --control-hover:rgba(110,154,255,.78);
  --control-bg:rgba(5,18,37,.46);

  --panel-bg:rgba(5,18,37,.62);
  --panel-bg-soft:rgba(5,18,37,.44);
  --panel-border:rgba(89,126,177,.34);

  --sidebar-bg:rgba(4,17,34,.84);
  --scene:none;
}

*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%}
body{
  min-width:320px;
  min-height:100vh;
  overflow:hidden;
  font-family:var(--ui);
  color:var(--text);
  background:#dceefb;
}
html[data-theme="dark"] body{background:#031022}
button,textarea{font:inherit}
button,a{cursor:pointer}
a{color:inherit}
button:focus-visible,a:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{
  outline:3px solid var(--focus);
  outline-offset:3px;
}
.skip-link{
  position:fixed;left:12px;top:12px;z-index:9999;
  transform:translateY(-180%);
  padding:10px 14px;border-radius:10px;background:#000;color:#fff;text-decoration:none;
}
.skip-link:focus{transform:none}
.sr-only{
  position:absolute!important;width:1px!important;height:1px!important;
  padding:0!important;margin:-1px!important;overflow:hidden!important;
  clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}

.portal{
  width:100vw;
  height:100dvh;
  display:grid;
  grid-template-columns:252px minmax(0,1fr);
}

/* =======================
   COMMON CONTROL SYSTEM
   ======================= */
.ui-control{
  min-height:var(--control-h);
  border:1px solid var(--control-border);
  border-radius:var(--control-r);
  color:var(--text);
  background:var(--control-bg);
  backdrop-filter:blur(15px);
  transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
button.ui-control:not(:disabled):hover,
a.ui-control:hover{
  border-color:var(--control-hover);
  box-shadow:0 0 0 1px color-mix(in srgb,var(--control-hover) 22%,transparent);
}
.control-icon{
  width:24px;
  flex:0 0 24px;
  display:grid;
  place-items:center;
  color:var(--gold);
  font-size:16px;
}
.control-label{font-weight:800}
.control-copy{
  min-width:0;
  display:grid;
  gap:2px;
  text-align:left;
}
.control-copy b{font-size:12px;line-height:1.15}
.control-copy small{
  color:var(--muted);
  font-size:9px;
  font-weight:500;
  line-height:1.15;
  white-space:nowrap;
}
.control-arrow{
  margin-left:auto;
  color:var(--blue);
  font-size:15px;
}

/* =======================
   SIDEBAR
   ======================= */
.sidebar{
  min-height:0;
  padding:28px 18px 15px;
  display:flex;
  flex-direction:column;
  background:var(--sidebar-bg);
  backdrop-filter:blur(18px);
  border-right:1px solid rgba(86,116,154,.16);
}
.brand{padding:4px 10px 31px}
.brand-main{
  font-family:var(--serif);
  font-size:40px;
  line-height:1;
  letter-spacing:.01em;
}
.brand-main span{color:var(--blue)}
.brand-sub{
  margin-top:8px;
  font-size:13px;
  font-weight:900;
  letter-spacing:.15em;
}
.nav{display:grid;gap:10px}
.nav-btn{
  width:100%;
  padding:0 14px;
  display:flex;
  align-items:center;
  gap:11px;
  text-align:left;
  background:rgba(255,255,255,.08);
}
html[data-theme="dark"] .nav-btn{background:rgba(255,255,255,.01)}
.nav-btn.active{
  color:#fff;
  border-color:rgba(91,145,242,.62);
  background:linear-gradient(115deg,#1750d1,#25a6df);
  box-shadow:0 11px 23px rgba(27,84,214,.18);
}
.nav-btn.active .control-icon{color:#fff}
.sidebar-spacer{flex:1}
.contact-control{
  padding:0 12px;
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}
.contact-icon{
  width:34px;height:34px;
  flex-basis:34px;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(135deg,var(--blue),var(--cyan));
}
.demo-status{
  margin:11px 5px 0;
  display:flex;
  align-items:center;
  gap:7px;
  color:var(--muted);
  font-size:9px;
}
.demo-status span{width:7px;height:7px;border-radius:50%;background:#22a96a}
.project-version{margin:5px 5px 0;color:var(--muted);font-size:8px}
.project-version strong{color:var(--text);font-weight:800}
.copyright{margin:7px 5px 0;color:var(--muted);font-size:8px}

/* =======================
   ONE VISUAL SCENE
   ======================= */
.main{
  min-width:0;
  min-height:0;
  padding:11px 20px 5px;
  display:grid;
  grid-template-rows:54px minmax(0,1fr) 15px;
  gap:6px;
  position:relative;
  isolation:isolate;
}
.main::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background-image:var(--scene);
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
}
.main::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(255,255,255,.06),transparent 46%),
    radial-gradient(900px 420px at 38% 68%,rgba(255,255,255,.12),transparent 70%);
}
html[data-theme="dark"] .main::after{
  background:
    linear-gradient(90deg,rgba(3,16,32,.05),transparent 46%),
    radial-gradient(900px 420px at 38% 68%,rgba(29,68,127,.06),transparent 70%);
}

/* =======================
   TOP BAR - SAME CONTROLS
   ======================= */
.topbar{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.top-cluster{
  display:flex;
  align-items:stretch;
  gap:8px;
}
.top-control{
  padding:0 12px;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:174px;
}
.top-control-static{
  cursor:default;
}
.top-actions{
  display:flex;
  gap:8px;
  flex:0 0 auto;
}
.utility-control{
  padding:0 13px;
  display:flex;
  align-items:center;
  gap:7px;
  white-space:nowrap;
}
.account-control{min-width:150px}

/* =======================
   STAGE
   ======================= */
.stage{
  min-height:0;
  display:grid;
  grid-template-rows:minmax(310px,1fr) auto auto minmax(22px,.24fr) 34px;
  overflow:hidden;
}

/* Search is central like the projection, but no longer a floating random box. */
.search-panel{
  position:relative;
  grid-row:2;
  width:min(1120px,78%);
  justify-self:start;
  margin-left:5.5%;
  min-height:116px;
  padding:12px 13px 11px 17px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  border:1px solid color-mix(in srgb,var(--gold) 34%,var(--panel-border));
  border-radius:24px;
  background:
    linear-gradient(105deg,
      color-mix(in srgb,var(--panel-bg) 94%,transparent),
      color-mix(in srgb,var(--panel-bg-soft) 82%,transparent));
  backdrop-filter:blur(22px);
  box-shadow:0 18px 48px rgba(34,58,96,.09);
}
.search-panel:focus-within,
.search-panel:hover{
  border-color:color-mix(in srgb,var(--control-hover) 70%,var(--gold) 30%);
}
.search-panel:focus-within{
  outline:3px solid var(--focus);
  outline-offset:2px;
}
.search-spark{color:var(--gold);font-size:20px}
.search-content{
  min-width:0;
  display:grid;
  grid-template-rows:auto auto;
}
.search-content textarea{
  width:100%;
  height:78px;
  padding:5px 0 3px;
  border:0;
  outline:0;
  resize:none;
  overflow-y:auto;
  color:var(--text);
  background:transparent;
  font-size:15px;
  line-height:1.42;
  scrollbar-width:thin;
}
.search-content textarea::placeholder{
  color:color-mix(in srgb,var(--muted) 80%,transparent);
  opacity:1;
}
.search-hint{font-size:8.5px;color:var(--muted)}
.error-question-choice{
  margin-top:5px;
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:8.5px;
}
.error-question-choice[hidden]{display:none}
.error-choice-button{
  border:1px solid var(--panel-border);
  border-radius:999px;
  padding:4px 7px;
  color:var(--muted);
  background:transparent;
  font:700 8.5px/1 var(--ui);
}
.error-choice-button.active{
  border-color:color-mix(in srgb,var(--blue) 48%,var(--panel-border));
  color:var(--blue);
  background:color-mix(in srgb,var(--blue) 8%,transparent);
}
.error-rule-results{
  position:absolute;
  z-index:80;
  top:calc(100% + 8px);
  left:54px;
  right:76px;
  max-height:min(340px,45vh);
  overflow-y:auto;
  padding:7px;
  border:1px solid color-mix(in srgb,var(--blue) 34%,var(--panel-border));
  border-radius:17px;
  background:color-mix(in srgb,var(--panel-bg) 97%,transparent);
  backdrop-filter:blur(22px);
  box-shadow:0 20px 48px rgba(18,39,76,.22);
}
.error-rule-results[hidden]{display:none}
.error-rule-option{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:3px 9px;
  padding:9px 11px;
  border:0;
  border-radius:12px;
  color:var(--text);
  background:transparent;
  text-align:left;
  cursor:pointer;
  font-family:var(--ui);
}
.error-rule-option:hover,.error-rule-option:focus-visible{
  outline:none;
  background:color-mix(in srgb,var(--blue) 10%,var(--panel-bg-soft));
}
.error-rule-option strong{font-size:12px;color:var(--blue)}
.error-rule-type{font-size:8px;color:var(--muted);text-transform:uppercase;letter-spacing:.07em}
.error-rule-message{
  grid-column:1/-1;
  font-size:10.5px;
  line-height:1.38;
  color:var(--muted);
}
.error-rule-empty{margin:0;padding:11px;color:var(--muted);font-size:10.5px;line-height:1.4}
.error-rule-empty.is-error{color:#b84a4a}
.send-control{
  width:52px;
  min-width:52px;
  height:52px;
  min-height:52px;
  padding:0;
  display:grid;
  place-items:center;
  color:#fff;
  border-color:rgba(72,128,232,.44);
  background:linear-gradient(135deg,var(--blue),var(--cyan));
  font-size:23px;
  font-weight:700;
  box-shadow:0 9px 22px rgba(28,84,218,.20);
}
.send-control:not(:disabled):hover{
  border-color:rgba(255,255,255,.76);
}
.send-control:disabled{opacity:.45;cursor:not-allowed}

/* Answer proportions closer to the projection, but still dynamic. */
.answer-panel{
  grid-row:3;
  width:min(1040px,72%);
  justify-self:start;
  margin:12px 0 0 5.5%;
  min-height:92px;
  max-height:35vh;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  border:1px solid var(--panel-border);
  border-radius:23px;
  background:
    linear-gradient(105deg,
      color-mix(in srgb,var(--panel-bg) 88%,transparent),
      color-mix(in srgb,var(--panel-bg-soft) 72%,transparent));
  backdrop-filter:blur(18px);
  box-shadow:0 15px 38px rgba(38,62,99,.06);
  transition:min-height .22s ease,max-height .22s ease;
}
.answer-panel.is-empty{min-height:92px}
.answer-panel.has-content{min-height:190px;max-height:35vh}
.answer-header{
  min-height:92px;
  padding:12px 19px;
  display:flex;
  align-items:center;
  gap:14px;
}
.answer-panel.has-content .answer-header{border-bottom:1px solid var(--panel-border)}
.ai-orb{
  width:58px;height:58px;
  flex:0 0 58px;
  display:grid;
  place-items:center;
  border:1px solid rgba(91,151,255,.48);
  border-radius:50%;
  color:#f2d29b;
  background:linear-gradient(145deg,#071a39,#12386d);
  box-shadow:0 0 0 6px rgba(73,119,216,.06);
  font-family:var(--serif);
  font-size:27px;
}
.answer-kicker{
  color:var(--gold);
  font-size:8.8px;
  font-weight:900;
  letter-spacing:.10em;
}
.answer-heading h2{
  margin:3px 0 2px;
  font-family:var(--serif);
  font-size:21px;
  font-weight:500;
}
.answer-heading p{margin:0;color:var(--muted);font-size:9.2px}
.new-conversation-button{
  margin-left:auto;
  border:1px solid var(--panel-border);
  border-radius:999px;
  padding:7px 11px;
  color:var(--text);
  background:rgba(255,255,255,.28);
  font:600 10px/1 var(--ui);
  cursor:pointer;
  white-space:nowrap;
}
.new-conversation-button:hover,.new-conversation-button:focus-visible{
  border-color:var(--gold);
  outline:none;
}
.new-conversation-button[hidden]{display:none}
.answer-body{
  display:none;
  min-height:0;
  overflow-y:auto;
  padding:12px 22px 15px 91px;
  color:var(--muted);
  scrollbar-width:thin;
  scrollbar-color:color-mix(in srgb,var(--muted) 30%,transparent) transparent;
}
.answer-panel.has-content .answer-body{display:block}
.answer-body::-webkit-scrollbar{width:5px}
.answer-body::-webkit-scrollbar-track{background:transparent}
.answer-body::-webkit-scrollbar-thumb{
  background:color-mix(in srgb,var(--muted) 30%,transparent);
  border-radius:10px;
}
.demo-response{max-width:900px;font-size:11.2px;line-height:1.58}
.demo-response p{margin:0 0 6px}
.demo-response strong{color:var(--text)}
.chat-message{
  max-width:900px;
  margin:0 0 11px;
  display:grid;
  gap:4px;
}
.chat-message-user{margin-left:auto;max-width:min(760px,88%)}
.chat-message-label{
  color:var(--muted);
  font-size:8px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.chat-message-user .chat-message-label{text-align:right}
.chat-bubble{
  padding:10px 12px;
  border:1px solid var(--panel-border);
  border-radius:14px;
  background:color-mix(in srgb,var(--panel-bg-soft) 68%,transparent);
}
.chat-message-user .chat-bubble{
  color:var(--text);
  background:color-mix(in srgb,var(--blue) 9%,var(--panel-bg-soft));
  border-bottom-right-radius:5px;
}
.chat-message-assistant .chat-bubble{border-bottom-left-radius:5px}
.chat-bubble>p{margin:0;font-size:11px;line-height:1.48;white-space:pre-wrap}
.chat-message.is-loading .chat-bubble{opacity:.72}
.mode-suggestion{
  margin-top:9px;
  padding-top:9px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  border-top:1px solid var(--panel-border);
  color:var(--muted);
  font-size:9.5px;
}
.mode-suggestion button{
  border:1px solid color-mix(in srgb,var(--blue) 40%,var(--panel-border));
  border-radius:999px;
  padding:5px 8px;
  color:var(--blue);
  background:transparent;
  font:700 9px/1.1 var(--ui);
}
.limit-message{
  max-width:760px;
  padding:10px 12px;
  border-left:2px solid var(--gold);
  background:color-mix(in srgb,var(--panel-bg-soft) 58%,transparent);
  font-size:10.6px;
}
.limit-message b{display:block;color:var(--text);margin-bottom:3px}

/* Bottom content is a single quiet line, not three random mini-cards. */
.feature-line{
  grid-row:5;
  width:min(1080px,76%);
  justify-self:start;
  margin-left:5.5%;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  align-items:center;
  border-top:1px solid rgba(78,111,154,.16);
}
.feature-item{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  color:var(--muted);
  font-size:7.4px;
}
.feature-item+ .feature-item{
  border-left:1px solid rgba(78,111,154,.13);
}
.feature-item>span{
  width:20px;height:20px;
  display:grid;place-items:center;
  color:var(--gold);
  font-size:11px;
}
.feature-item b{color:var(--text);font-size:8.3px}
.feature-item small{font-size:7px}

.footer{
  min-height:15px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  overflow:hidden;
  white-space:nowrap;
  color:var(--muted);
  font-size:6.7px;
}
.footer b{color:var(--text)}

/* =======================
   DIALOGS
   ======================= */
.modal[hidden]{display:none!important}
.modal{
  position:fixed;inset:0;z-index:1200;
  display:grid;place-items:center;
}
.modal-backdrop{
  position:absolute;inset:0;
  background:rgba(2,10,24,.58);
  backdrop-filter:blur(5px);
}
.dialog{
  position:relative;z-index:2;
  width:min(430px,calc(100vw - 32px));
  padding:28px;
  border:1px solid var(--panel-border);
  border-radius:23px;
  background:var(--panel-bg);
  backdrop-filter:blur(20px);
  box-shadow:0 30px 90px rgba(0,0,0,.28);
  text-align:center;
}
.dialog-close{
  position:absolute;right:11px;top:10px;
  width:44px;min-width:44px;height:44px;min-height:44px;
  padding:0;
  display:grid;place-items:center;
  background:var(--control-bg);
  font-size:24px;
}
.dialog-icon{
  width:56px;height:56px;
  margin:0 auto 11px;
  display:grid;place-items:center;
  border-radius:50%;
  background:var(--panel-bg-soft);
  color:var(--blue);
  font-size:24px;
}
.dialog-icon.premium{color:var(--gold)}
.dialog h2{
  margin:0 0 9px;
  font-family:var(--serif);
  font-size:27px;
  font-weight:500;
}
.dialog p{
  margin:0 0 16px;
  color:var(--muted);
  font-size:13px;
  line-height:1.55;
}
.dialog-primary{
  min-width:130px;
  padding:0 18px;
  color:#fff;
  border-color:rgba(72,128,232,.44);
  background:linear-gradient(135deg,var(--blue),var(--cyan));
  font-weight:900;
}

/* 1920x1080 and similar desktop */
@media(min-width:1200px) and (max-height:900px){
  .stage{
    grid-template-rows:minmax(240px,1fr) auto auto minmax(18px,.18fr) 30px;
  }
  .search-panel{min-height:106px}
  .search-content textarea{height:69px}
  .answer-panel.is-empty{min-height:82px}
  .answer-header{min-height:82px}
  .ai-orb{width:52px;height:52px;flex-basis:52px}
}

/* Responsive fallback */
@media(max-width:1180px){
  body{overflow:auto}
  .portal{
    height:auto;
    min-height:100vh;
    grid-template-columns:220px minmax(0,1fr);
  }
  .sidebar{height:100vh;position:sticky;top:0}
  .main{min-height:100vh;display:block;padding:12px}
  .topbar{margin-bottom:12px}
  .top-control{min-width:auto}
  .control-copy small{display:none}
  .stage{
    min-height:650px;
    display:grid;
    grid-template-rows:minmax(300px,1fr) auto auto minmax(20px,.18fr) 34px;
  }
  .search-panel{width:90%;margin-left:3%}
  .answer-panel{width:86%;margin-left:3%}
  .feature-line{width:90%;margin-left:3%}
  .footer{white-space:normal;flex-wrap:wrap;padding:6px 0}
}
@media(max-width:820px){
  .portal{display:block}
  .sidebar{
    height:auto;position:relative;padding:12px;
    border-right:0;border-bottom:1px solid var(--control-border);
  }
  .brand{padding:3px 6px 12px}
  .nav{
    grid-template-columns:repeat(3,minmax(160px,1fr));
    overflow:auto;
  }
  .sidebar-spacer,.contact-control,.demo-status,.project-version,.copyright{display:none}
  .topbar{flex-wrap:wrap}
  .top-cluster{width:100%;display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
  .top-control{min-width:0}
  .top-actions{margin-left:auto}
  .main::before{background-position:65% center}
  .stage{min-height:720px}
  .search-panel,.answer-panel,.feature-line{width:calc(100% - 24px);margin-left:12px}
  .answer-body{padding-left:22px}
  .feature-line{grid-template-columns:1fr}
  .feature-item+.feature-item{border-left:0}
  .footer{display:none}
}

@media(max-width:640px){
  .error-rule-results{left:8px;right:8px;max-height:42vh}
  .error-rule-option{padding:9px}
}
@media(max-width:560px){
  .top-cluster{grid-template-columns:1fr}
  .utility-control .control-label{display:none}
  .account-control{min-width:auto}
  .search-spark{display:none}
  .search-panel{
    grid-template-columns:minmax(0,1fr) auto;
    padding-left:12px;
  }
}

/* 4.26 — formularz pozostaje dostępny przez całą rozmowę. */
.search-panel.conversation-active{
  display:grid!important;
  grid-row:4!important;
  width:min(980px,70%)!important;
  min-height:78px!important;
  margin-top:12px!important;
  padding:9px 12px 9px 15px!important;
  align-self:start!important;
}
.search-panel.conversation-active .search-content textarea{
  height:48px!important;
  min-height:48px!important;
  max-height:132px!important;
}
.search-panel.conversation-active .search-spark{font-size:16px!important}
.search-panel.conversation-active .send-control{
  width:48px!important;
  min-width:48px!important;
  height:48px!important;
  min-height:48px!important;
}
.search-panel.conversation-active textarea:disabled{
  color:var(--text);opacity:.72;cursor:not-allowed;background:transparent;
}
.followup-composer{
  display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:10px;align-items:center;
  margin:10px 0 2px;padding:10px 12px;border:1px solid var(--control-border);
  border-radius:18px;background:rgba(255,255,255,.72);box-shadow:0 8px 22px rgba(20,54,92,.07);
}
.followup-composer textarea{
  width:100%;min-height:48px;max-height:120px;resize:vertical;border:0;outline:0;
  padding:10px 4px;background:transparent;color:var(--text);font:inherit;
}
.followup-send{width:44px;height:44px;min-width:44px;border-radius:50%;padding:11px}
.accessibility-note{font-weight:700;color:var(--muted)}

/* 4.32 — kontrast małych treści i akcentów zgodny z poziomem AA. */
html[data-theme="light"]{
  --muted:#40536f;
  --blue:#1248bd;
  --cyan:#1176c4;
  --gold:#704400;
}
@media(max-width:560px){
  .followup-composer{margin:8px -8px 2px;padding:8px 9px;border-radius:15px}
}
@media(max-width:820px){
  .search-panel.conversation-active{
    width:calc(100% - 12px)!important;
    margin:9px 6px 0!important;
    min-height:76px!important;
  }
}

/* NFZ AI 4.33 — kompaktowa nawigacja, licznik i rozmowa */
.no-link-decoration{text-decoration:none!important}
.nav{gap:8px!important}
.nav .nav-btn{box-sizing:border-box!important;width:100%!important;min-height:56px!important;height:56px!important;padding:10px 16px!important;border-radius:15px!important;font:750 13px/1.2 var(--ui)!important}
.nav .nav-btn .control-label{font:inherit!important}
.topbar{justify-content:flex-end!important;align-items:center!important;gap:8px!important}
.top-actions,.top-cluster{flex:0 0 auto!important;width:auto!important;gap:8px!important}
.topbar .utility-control,.topbar .usage-counter{box-sizing:border-box!important;min-height:48px!important;height:48px!important;padding:8px 13px!important;border-radius:14px!important;font-family:var(--ui)!important}
.usage-counter .control-copy{display:grid;gap:1px}.usage-counter .control-copy b{font-size:11px!important}.usage-counter .control-copy small{font-size:9px!important;color:var(--muted)}
.feature-line{display:none!important}
.stage{grid-template-rows:minmax(220px,1fr) auto minmax(180px,.75fr)!important}
.search-panel{width:min(1040px,78%)!important;min-height:76px!important;padding:8px 10px 8px 14px!important;align-self:center!important}
.search-content textarea{min-height:44px!important;height:44px;max-height:132px!important;padding:10px 4px!important;font-size:14px!important;line-height:1.45!important;resize:none!important;overflow-y:auto!important}
.search-hint{font-size:9px!important}
.send-control{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important}
.search-panel.conversation-active{display:none!important}
.followup-composer{width:min(760px,100%)!important;min-height:52px!important;margin:10px 0 2px!important;padding:5px 6px 5px 10px!important;border-radius:14px!important}
.followup-composer textarea{min-height:42px!important;height:42px;max-height:120px!important;padding:9px 2px!important;font-size:13px!important;line-height:1.45!important;resize:none!important;overflow-y:auto!important}
.followup-send{width:42px!important;height:42px!important;min-width:42px!important;padding:10px!important}
@media(max-width:820px){
  .topbar{display:flex!important;flex-wrap:wrap!important}.top-actions{order:1}.top-cluster{order:2}
  .topbar .utility-control,.topbar .usage-counter{height:42px!important;min-height:42px!important;padding:6px 9px!important}
  .stage{grid-template-rows:auto auto minmax(170px,1fr)!important}
  .search-panel{width:calc(100% - 16px)!important;min-height:68px!important;margin:0 8px!important;padding:7px 8px 7px 11px!important}
}
@media(max-width:560px){
  .topbar{display:none!important}
  .nav{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:5px!important}
  .nav .nav-btn{min-height:42px!important;height:42px!important;padding:6px!important;border-radius:12px!important;font-size:9px!important;justify-content:center!important}
  .nav .nav-btn .icon-slot{width:20px!important;height:20px!important;flex-basis:20px!important}
  .topbar{gap:5px!important}.topbar .control-label,.usage-counter .control-copy b{font-size:9px!important}.usage-counter .control-copy small{font-size:7px!important}
  .topbar .utility-control,.topbar .usage-counter{padding:5px 7px!important}
  .search-content textarea{font-size:12px!important}.followup-composer textarea{font-size:12px!important}
}

/* 4.26 — spokojniejszy i bardziej kompaktowy pulpit.
   Więcej kadru fotografii, mniej pustej jasnej powierzchni i niższe panele. */
@media(min-width:921px){
  .stage{
    grid-template-rows:minmax(168px,auto) auto auto minmax(6px,.04fr) 25px!important;
  }

  .hero-copy-main{
    width:min(430px,34%)!important;
    margin:0 0 5px 16px!important;
  }
  .hero-eyebrow{
    min-height:20px!important;
    padding:2px 7px!important;
    font-size:7px!important;
  }
  .hero-copy-main h2{
    margin:6px 0 4px!important;
    font-size:clamp(23px,1.75vw,30px)!important;
    line-height:1.05!important;
  }
  .hero-copy-main p{
    max-width:405px!important;
    font-size:9.5px!important;
    line-height:1.4!important;
  }

  .main::before{
    width:clamp(720px,51vw,940px)!important;
    height:clamp(430px,31vw,540px)!important;
    background-size:contain!important;
    background-position:right top!important;
  }

  .search-panel,
  .search-panel.conversation-active{
    width:min(1080px,73%)!important;
    min-height:68px!important;
    margin-left:16px!important;
    padding:7px 10px 7px 14px!important;
    border-radius:17px!important;
  }
  .search-content textarea,
  .search-panel.conversation-active .search-content textarea{
    height:38px!important;
    min-height:38px!important;
    max-height:112px!important;
    padding:2px 0!important;
    font-size:14px!important;
  }
  .send-control,
  .search-panel.conversation-active .send-control{
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
  }

  .answer-panel{
    width:min(1160px,79%)!important;
    margin:9px 0 0 16px!important;
    border-radius:17px!important;
  }
  .answer-panel.is-empty{
    min-height:72px!important;
  }
  .answer-header{
    min-height:72px!important;
    padding:8px 15px!important;
    gap:11px!important;
  }
  .ai-orb{
    width:46px!important;
    height:46px!important;
    flex-basis:46px!important;
    font-size:22px!important;
  }
  .answer-heading h2{font-size:18px!important}
  .answer-heading p{font-size:8.5px!important}

  .feature-line{
    width:min(1160px,79%)!important;
    min-height:25px!important;
    margin-left:16px!important;
    display:flex!important;
    flex-wrap:nowrap!important;
  }
  .feature-item{
    flex:1 1 0!important;
    min-height:25px!important;
    white-space:nowrap!important;
  }
  .feature-item>span{width:16px!important;height:16px!important}
  .footer{
    min-height:12px!important;
    height:12px!important;
    gap:9px!important;
    font-size:6.4px!important;
  }
}

/* Jasny motyw ma pozostać jasny, ale nie biały i rażący. */
html[data-theme="light"] body{
  background:
    radial-gradient(circle at 77% 7%,rgba(91,129,172,.13),transparent 28%),
    linear-gradient(145deg,#edf3f7 0%,#e2ebf1 50%,#d5e2ea 100%)!important;
}
html[data-theme="light"] .portal::before{
  background:
    radial-gradient(980px 500px at 43% 34%,rgba(244,248,251,.72),transparent 69%),
    radial-gradient(760px 500px at 84% 18%,rgba(163,197,218,.30),transparent 72%),
    linear-gradient(116deg,rgba(235,243,248,.82),rgba(215,229,238,.70) 58%,rgba(190,211,224,.54))!important;
}
html[data-theme="light"] .main::after{
  background:
    linear-gradient(90deg,rgba(233,241,246,.34) 0%,rgba(226,236,242,.18) 38%,rgba(218,230,238,.05) 60%,transparent 77%),
    linear-gradient(180deg,transparent 0%,transparent 61%,rgba(202,219,230,.18) 76%,rgba(192,211,224,.48) 100%)!important;
}
html[data-theme="light"] .sidebar{
  background:linear-gradient(180deg,rgba(232,241,247,.78),rgba(220,232,240,.66))!important;
}
html[data-theme="light"] .search-panel{
  background:linear-gradient(105deg,rgba(239,245,248,.83),rgba(221,232,239,.58))!important;
}
html[data-theme="light"] .answer-panel{
  background:linear-gradient(105deg,rgba(236,243,247,.80),rgba(216,229,237,.55))!important;
}

/* 4.26 — telefon: mały nagłówek tuż pod kompaktowymi przyciskami. */
@media(max-width:640px){
  .stage>.top-cluster{
    gap:4px!important;
    margin:0 4px 4px!important;
  }
  .stage>.top-cluster .top-control,
  .stage>.top-cluster #accountButton{
    height:34px!important;
    min-height:34px!important;
    padding:0 5px!important;
    gap:4px!important;
    border-radius:11px!important;
  }
  .stage>.top-cluster .icon-slot{
    width:17px!important;
    height:17px!important;
    flex-basis:17px!important;
  }
  .stage>.top-cluster .icon-svg{width:15px!important;height:15px!important}
  .stage>.top-cluster .control-copy b,
  .stage>.top-cluster #accountButton .control-label{
    font-size:9px!important;
    line-height:1!important;
  }
  .stage>.top-cluster .control-arrow{font-size:9px!important}

  .hero-copy-main{
    width:calc(100% - 20px)!important;
    margin:2px auto 5px!important;
    padding:0!important;
    text-align:center!important;
  }
  .hero-eyebrow{
    min-height:18px!important;
    padding:2px 6px!important;
    font-size:7px!important;
    letter-spacing:.08em!important;
  }
  .hero-copy-main h2{
    margin:4px 0 3px!important;
    font-size:clamp(19px,5.7vw,22px)!important;
    line-height:1.05!important;
    letter-spacing:-.025em!important;
    text-align:center!important;
  }
  .hero-copy-main p{
    max-width:440px!important;
    margin:0 auto!important;
    font-size:11px!important;
    line-height:1.34!important;
    text-align:center!important;
  }

  .stage>.nav{margin-bottom:6px!important}
  .stage>.nav .nav-btn{
    height:44px!important;
    min-height:44px!important;
  }

  .stage>.search-panel{
    min-height:86px!important;
    padding:8px 10px!important;
    border-radius:17px!important;
  }
  .stage>.search-panel .search-content textarea{
    height:46px!important;
    min-height:46px!important;
    font-size:13px!important;
  }
  .stage>.search-panel .send-control{
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
  }
  .answer-panel.is-empty,
  .answer-header{
    min-height:72px!important;
  }
  .answer-header{padding:8px 10px!important}
  .answer-header .ai-orb{
    width:46px!important;
    height:46px!important;
    flex-basis:46px!important;
    font-size:22px!important;
  }
  .answer-heading h2{font-size:16px!important}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}


/* ==========================================================
   PORTAL 3.1 — ONE CONTROL SYSTEM + ONE ICON SYSTEM
   ========================================================== */

:root{
  --unified-h:52px;
  --unified-radius:15px;
  --unified-pad-x:14px;
  --unified-border:rgba(70,111,165,.26);
  --unified-border-hover:rgba(38,98,203,.72);
  --unified-bg:rgba(255,255,255,.30);
  --unified-icon:#9c6b22;
}
html[data-theme="dark"]{
  --unified-border:rgba(94,132,181,.34);
  --unified-border-hover:rgba(108,154,255,.78);
  --unified-bg:rgba(5,18,37,.34);
  --unified-icon:#d8b36d;
}

.ui-control{
  min-height:var(--unified-h) !important;
  border:1px solid var(--unified-border) !important;
  border-radius:var(--unified-radius) !important;
  background:var(--unified-bg) !important;
  color:var(--text) !important;
  backdrop-filter:blur(15px);
  box-shadow:none !important;
  text-decoration:none !important;
  font-family:var(--ui);
  transition:border-color .16s ease, box-shadow .16s ease !important;
}
button.ui-control:not(:disabled):hover,
a.ui-control:hover{
  border-color:var(--unified-border-hover) !important;
  box-shadow:0 0 0 1px color-mix(in srgb,var(--unified-border-hover) 20%,transparent) !important;
  background:var(--unified-bg) !important;
  color:var(--text) !important;
  text-decoration:none !important;
}
.ui-control:focus-visible{
  outline:3px solid var(--focus) !important;
  outline-offset:3px !important;
}
.no-link-decoration,
.no-link-decoration:link,
.no-link-decoration:visited,
.no-link-decoration:hover,
.no-link-decoration:active,
.top-control,
.contact-control{
  text-decoration:none !important;
}

.icon-slot{
  width:24px;
  height:24px;
  flex:0 0 24px;
  display:grid;
  place-items:center;
  color:var(--unified-icon);
}
.icon-svg{
  width:20px;
  height:20px;
  display:block;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.glyph-slot{
  font-family:Georgia,"Times New Roman",serif;
  font-size:22px;
  line-height:1;
  font-weight:600;
}
.control-label{
  font-size:12px;
  font-weight:800;
  line-height:1.15;
}
.control-copy{
  min-width:0;
  display:grid;
  gap:2px;
  text-align:left;
}
.control-copy b{
  font-size:12px;
  line-height:1.15;
  font-weight:800;
  text-decoration:none !important;
}
.control-copy small{
  font-size:9px;
  line-height:1.15;
  color:var(--muted);
  text-decoration:none !important;
}
.control-copy strong{
  text-decoration:none !important;
}
.control-arrow{
  margin-left:auto;
  color:var(--blue);
  font-size:15px;
  line-height:1;
}

/* Left controls = exactly the same external component language as top controls */
.nav{
  gap:9px;
}
.nav-btn{
  min-height:var(--unified-h) !important;
  height:var(--unified-h);
  padding:0 var(--unified-pad-x) !important;
  gap:10px;
  text-align:left;
  justify-content:flex-start;
}
.nav-btn.active{
  border-color:rgba(55,112,218,.62) !important;
  background:linear-gradient(115deg,rgba(23,80,209,.94),rgba(37,166,223,.94)) !important;
  color:#fff !important;
  box-shadow:0 9px 21px rgba(27,84,214,.15) !important;
}
.nav-btn.active .icon-slot{
  color:#fff;
}
.nav-btn.active:hover{
  border-color:rgba(128,175,255,.88) !important;
  background:linear-gradient(115deg,rgba(23,80,209,.94),rgba(37,166,223,.94)) !important;
  color:#fff !important;
}

.contact-control{
  min-height:var(--unified-h) !important;
  padding:0 var(--unified-pad-x) !important;
  gap:10px;
}
.contact-control .icon-slot{
  color:var(--unified-icon);
}

/* Top: no special "group card". Each element is exactly the same button component */
.top-cluster{
  display:flex !important;
  align-items:center !important;
  gap:8px !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  backdrop-filter:none !important;
  overflow:visible !important;
}
.top-control{
  min-height:var(--unified-h) !important;
  height:var(--unified-h);
  min-width:180px;
  padding:0 var(--unified-pad-x) !important;
  border-left:1px solid var(--unified-border) !important;
  gap:9px;
  display:flex;
  align-items:center;
}
.top-cluster .top-control:first-child{
  border-left:1px solid var(--unified-border) !important;
}
.top-control-static{
  cursor:default;
}
.top-control-static:hover{
  border-color:var(--unified-border) !important;
  box-shadow:none !important;
}

.top-actions{
  display:flex !important;
  align-items:center;
  gap:8px !important;
}
.utility-control{
  min-height:var(--unified-h) !important;
  height:var(--unified-h);
  min-width:150px;
  padding:0 var(--unified-pad-x) !important;
  display:flex;
  align-items:center;
  gap:9px;
  justify-content:flex-start;
}
.utility-control:first-child{
  min-width:126px;
}

/* Theme icon is controlled entirely by current theme */
.theme-icon-slot .moon-icon{display:none}
html[data-theme="dark"] .theme-icon-slot .sun-icon{display:none}
html[data-theme="dark"] .theme-icon-slot .moon-icon{display:block}

/* Send shares the same corner/border language, but remains circular primary action */
.send-control{
  width:52px !important;
  min-width:52px !important;
  height:52px !important;
  min-height:52px !important;
  border-radius:50% !important;
  padding:0 !important;
  color:#fff !important;
  background:linear-gradient(135deg,var(--blue),var(--cyan)) !important;
  border-color:rgba(79,133,233,.52) !important;
}
.send-control .icon-svg{
  width:21px;
  height:21px;
  stroke-width:2;
}
.send-control:not(:disabled):hover{
  background:linear-gradient(135deg,var(--blue),var(--cyan)) !important;
  color:#fff !important;
  border-color:rgba(255,255,255,.82) !important;
}

/* Dialog buttons use same component grammar */
.dialog-close{
  min-width:44px !important;
  width:44px !important;
  min-height:44px !important;
  height:44px !important;
  padding:0 !important;
  display:grid !important;
  place-items:center;
}
.dialog-primary{
  min-width:140px;
  padding:0 18px !important;
  color:#fff !important;
  background:linear-gradient(135deg,var(--blue),var(--cyan)) !important;
}
.dialog-icon .icon-svg{
  width:25px;
  height:25px;
}
.dialog-icon.premium{
  color:var(--gold);
}

/* Make sidebar/top typographic rhythm consistent */
.sidebar .control-label,
.topbar .control-label,
.topbar .control-copy b,
.contact-control .control-copy b{
  letter-spacing:0;
}

/* No underlines anywhere inside action controls */
.ui-control *,
.ui-control:hover *,
.ui-control:focus *,
.ui-control:visited *{
  text-decoration:none !important;
}

/* Small screen fallbacks keep the same component language */
@media(max-width:1180px){
  .top-control{
    min-width:150px;
  }
  .top-control .control-copy small{
    display:none;
  }
  .utility-control{
    min-width:126px;
  }
}
@media(max-width:820px){
  .top-cluster{
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    width:100%;
  }
  .top-control{
    min-width:0;
    width:100%;
  }
}
@media(max-width:560px){
  .top-cluster{
    grid-template-columns:1fr !important;
  }
  .utility-control .control-label{
    display:none;
  }
  .utility-control{
    min-width:52px;
    width:52px;
    padding:0 !important;
    justify-content:center;
  }
  .utility-control .control-arrow{
    display:none;
  }
}


/* ==========================================================
   PORTAL 3.2 — VISUAL COHERENCE
   One font, continuous scene, lighter sidebar, restored hero copy.
   ========================================================== */
:root{
  --ui:"Segoe UI",Arial,Helvetica,sans-serif;
  --serif:"Segoe UI",Arial,Helvetica,sans-serif;
  --scene-glass:rgba(255,255,255,.28);
  --scene-glass-strong:rgba(255,255,255,.48);
}
html[data-theme="dark"]{
  --scene-glass:rgba(4,16,34,.34);
  --scene-glass-strong:rgba(4,16,34,.56);
}
html,body,button,input,select,textarea,a{
  font-family:var(--ui)!important;
}
.brand-main,.brand-sub,.ai-orb,.answer-heading h2,.dialog h2,
.hero-copy-main h2,.hero-eyebrow{
  font-family:var(--ui)!important;
}

body{
  background:
    radial-gradient(circle at 76% 7%,rgba(85,140,225,.18),transparent 27%),
    radial-gradient(circle at 91% 88%,rgba(184,145,82,.10),transparent 25%),
    linear-gradient(145deg,#f9fcff 0%,#eaf5fd 46%,#d9ebf7 100%);
}
html[data-theme="dark"] body{
  background:
    radial-gradient(circle at 76% 8%,rgba(70,112,185,.13),transparent 25%),
    radial-gradient(circle at 90% 90%,rgba(164,125,70,.07),transparent 22%),
    linear-gradient(145deg,#071426 0%,#041020 52%,#020a14 100%);
}

.portal{
  position:relative;
  isolation:isolate;
  grid-template-columns:260px minmax(0,1fr);
  background:transparent;
}
.portal::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-4;
  pointer-events:none;
  background:
    radial-gradient(1100px 540px at 43% 34%,rgba(255,255,255,.92),transparent 68%),
    radial-gradient(760px 500px at 84% 18%,rgba(174,219,248,.42),transparent 72%),
    linear-gradient(116deg,rgba(255,255,255,.78),rgba(221,240,252,.62) 58%,rgba(181,214,237,.42));
}
.portal::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-3;
  pointer-events:none;
  opacity:.56;
  background:
    radial-gradient(ellipse 70% 15% at 54% 80%,transparent 58%,rgba(111,151,204,.14) 59%,transparent 60%),
    radial-gradient(ellipse 78% 19% at 62% 87%,transparent 57%,rgba(188,145,74,.10) 58%,transparent 59%);
}
html[data-theme="dark"] .portal::before{
  background:
    radial-gradient(900px 500px at 44% 38%,rgba(15,40,74,.54),transparent 68%),
    radial-gradient(720px 500px at 84% 15%,rgba(39,76,128,.30),transparent 72%),
    linear-gradient(116deg,rgba(4,16,33,.94),rgba(4,19,39,.86) 58%,rgba(3,13,28,.94));
}
html[data-theme="dark"] .portal::after{
  opacity:.45;
  background:
    radial-gradient(circle at 43% 15%,rgba(255,255,255,.38) 0 1px,transparent 1.5px),
    radial-gradient(circle at 74% 23%,rgba(255,255,255,.28) 0 1px,transparent 1.4px),
    radial-gradient(circle at 89% 17%,rgba(255,255,255,.22) 0 1px,transparent 1.3px),
    radial-gradient(circle at 68% 71%,rgba(255,255,255,.20) 0 1px,transparent 1.3px),
    radial-gradient(ellipse 70% 15% at 54% 80%,transparent 58%,rgba(89,127,188,.13) 59%,transparent 60%);
  background-size:auto,auto,auto,auto,auto;
}

.sidebar{
  padding:27px 17px 15px;
  background:linear-gradient(180deg,rgba(248,253,255,.56),rgba(241,249,254,.42));
  border-right:1px solid rgba(65,111,165,.18);
  box-shadow:10px 0 40px rgba(54,88,128,.035);
  backdrop-filter:blur(18px);
}
html[data-theme="dark"] .sidebar{
  background:linear-gradient(180deg,rgba(5,20,40,.58),rgba(4,16,33,.48));
  border-right-color:rgba(105,139,184,.22);
}
.brand{padding:5px 8px 28px}
.brand-main{
  font-size:37px;
  font-weight:800;
  letter-spacing:-.035em;
}
.brand-main span{font-weight:700}
.brand-sub{
  margin-top:7px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.18em;
}
.nav{gap:9px}
.nav-btn{
  min-height:52px!important;
  height:52px;
  border-radius:15px!important;
  background:rgba(255,255,255,.25)!important;
  border-color:rgba(65,111,165,.24)!important;
}
html[data-theme="dark"] .nav-btn{
  background:rgba(4,16,34,.28)!important;
}
.nav-btn.active{
  color:var(--text)!important;
  background:linear-gradient(105deg,rgba(223,238,255,.76),rgba(226,248,255,.58))!important;
  border-color:rgba(35,101,207,.72)!important;
  box-shadow:0 0 0 1px rgba(35,101,207,.10),0 8px 22px rgba(36,79,144,.06)!important;
}
.nav-btn.active .icon-slot{color:#1762c5!important}
html[data-theme="dark"] .nav-btn.active{
  color:#fff!important;
  background:linear-gradient(105deg,rgba(32,72,126,.62),rgba(19,74,110,.48))!important;
  border-color:rgba(99,148,230,.78)!important;
}
html[data-theme="dark"] .nav-btn.active .icon-slot{color:#89afff!important}
.nav-btn .control-label{font-size:12.5px;font-weight:750}
.contact-control{background:rgba(255,255,255,.23)!important}
html[data-theme="dark"] .contact-control{background:rgba(4,16,34,.28)!important}

.main{
  padding:11px 21px 5px;
  position:relative;
  background:transparent;
}
.main::before{
  content:"";
  position:absolute;
  inset:0 0 24px 28%;
  z-index:-2;
  pointer-events:none;
  background-image:url("assets/hero-clean-work.png");
  background-repeat:no-repeat;
  background-position:92% -6px;
  background-size:min(760px,54vw) auto;
  opacity:.98;
  filter:saturate(.94) contrast(1.01) brightness(1.03);
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.08) 12%,rgba(0,0,0,.34) 24%,#000 46%,#000 100%);
  mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.08) 12%,rgba(0,0,0,.34) 24%,#000 46%,#000 100%);
}
html[data-theme="dark"] .main::before{
  opacity:.72;
  filter:saturate(.75) brightness(.55) contrast(1.10);
}
.main::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  pointer-events:none;
  background:
    linear-gradient(90deg,rgba(255,255,255,.20) 0%,rgba(255,255,255,.11) 36%,rgba(255,255,255,.04) 58%,transparent 76%),
    radial-gradient(760px 420px at 69% 15%,rgba(255,255,255,.16),transparent 62%),
    radial-gradient(680px 360px at 50% 76%,rgba(255,255,255,.22),transparent 76%);
}
html[data-theme="dark"] .main::after{
  background:
    linear-gradient(90deg,rgba(3,15,31,.30) 0%,rgba(3,15,31,.12) 38%,rgba(3,15,31,.04) 60%,transparent 76%),
    radial-gradient(760px 420px at 69% 15%,rgba(22,54,98,.12),transparent 62%),
    radial-gradient(680px 360px at 50% 76%,rgba(24,58,103,.10),transparent 76%);
}

.topbar{position:relative;z-index:5}
.ui-control{
  background:rgba(255,255,255,.27)!important;
  backdrop-filter:blur(16px);
}
html[data-theme="dark"] .ui-control{background:rgba(5,18,38,.34)!important}
.top-control,.utility-control{height:52px!important;min-height:52px!important}
.top-control{min-width:190px}
.control-copy b,.control-label{font-weight:750}
.control-copy small{font-weight:500}

.stage{
  position:relative;
  grid-template-rows:minmax(250px,1fr) auto auto minmax(18px,.20fr) 34px;
}
.hero-copy-main{
  grid-row:1;
  align-self:center;
  justify-self:start;
  width:min(650px,48%);
  margin-left:5.5%;
  padding:8px 0 18px;
  position:relative;
  z-index:2;
}
.hero-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:28px;
  padding:5px 10px;
  border:1px solid rgba(176,128,52,.32);
  border-radius:999px;
  background:rgba(255,255,255,.24);
  color:#986720;
  font-size:9px;
  font-weight:800;
  letter-spacing:.12em;
  backdrop-filter:blur(8px);
}
html[data-theme="dark"] .hero-eyebrow{
  color:#d7b46f;
  background:rgba(5,18,38,.24);
  border-color:rgba(215,180,111,.30);
}
.hero-copy-main h2{
  margin:13px 0 8px;
  color:var(--text);
  font-size:clamp(33px,3.2vw,54px);
  line-height:.98;
  letter-spacing:-.045em;
  font-weight:650;
}
.hero-copy-main h2 span{color:#1762c5}
html[data-theme="dark"] .hero-copy-main h2 span{color:#7fa6ff}
.hero-copy-main p{
  max-width:585px;
  margin:0;
  color:var(--muted);
  font-size:12px;
  line-height:1.55;
}

.search-panel{
  width:min(1040px,76%);
  margin-left:5.5%;
  border-radius:20px;
  background:linear-gradient(105deg,rgba(255,255,255,.54),rgba(255,255,255,.25));
  box-shadow:0 16px 40px rgba(32,66,112,.07);
}
html[data-theme="dark"] .search-panel{
  background:linear-gradient(105deg,rgba(5,20,43,.64),rgba(5,20,43,.34));
}
.answer-panel{
  width:min(980px,70%);
  border-radius:20px;
  background:linear-gradient(105deg,rgba(255,255,255,.48),rgba(255,255,255,.23));
  box-shadow:0 14px 34px rgba(32,66,112,.055);
}
html[data-theme="dark"] .answer-panel{
  background:linear-gradient(105deg,rgba(5,20,43,.58),rgba(5,20,43,.32));
}
.ai-orb,.answer-heading h2{font-family:var(--ui)!important}
.feature-line{opacity:.84}
.footer{font-family:var(--ui)!important}

@media(max-width:1320px){
  .portal{grid-template-columns:238px minmax(0,1fr)}
  .top-control{min-width:164px}
  .hero-copy-main{width:47%;margin-left:3.5%}
  .hero-copy-main h2{font-size:clamp(31px,3vw,44px)}
  .search-panel,.answer-panel,.feature-line{margin-left:3.5%}
  .main::before{left:24%;background-size:min(650px,58vw);background-position:100% 19%}
}
@media(max-width:1180px){
  .hero-copy-main{width:52%;margin:22px 0 20px 3%}
  .main::before{opacity:.62;background-position:112% 13%;background-size:620px auto}
  .search-panel{width:90%;margin-left:3%}
  .answer-panel{width:86%;margin-left:3%}
  .feature-line{width:90%;margin-left:3%}
}
@media(max-width:820px){
  .portal{display:block}
  .sidebar{background:rgba(247,252,255,.78)}
  html[data-theme="dark"] .sidebar{background:rgba(4,16,33,.84)}
  .main::before{inset:120px -70px auto 32%;height:420px;opacity:.20;background-size:520px auto}
  .hero-copy-main{width:calc(100% - 30px);margin:18px 15px 16px}
  .hero-copy-main h2{font-size:36px}
  .hero-copy-main p{max-width:620px}
  .stage{min-height:760px}
  .search-panel,.answer-panel,.feature-line{width:calc(100% - 30px);margin-left:15px}
}

/* 3.2 CLEAN — absolute single-font rule */
.glyph-slot{font-family:var(--ui)!important;}


/* ==========================================================
   PORTAL 3.5 — RESPONSIVE SCENE BLEND
   TYLKO: skalowanie/kadrowanie obrazu + płynne przejścia tła.
   Layout, przyciski, wyszukiwarka i wynik pozostają bez zmian.
   ========================================================== */

.main{
  background:
    radial-gradient(920px 620px at 94% 7%,
      rgba(93,116,151,.20) 0%,
      rgba(140,166,199,.10) 34%,
      rgba(213,233,247,.04) 60%,
      transparent 78%),
    linear-gradient(108deg,
      #fbfdff 0%,
      #f4faff 31%,
      #eaf5fc 54%,
      #dceefa 76%,
      #cee5f5 100%);
}

html[data-theme="dark"] .main{
  background:
    radial-gradient(940px 640px at 94% 7%,
      rgba(48,72,108,.42) 0%,
      rgba(24,48,83,.22) 38%,
      rgba(8,27,52,.08) 64%,
      transparent 80%),
    linear-gradient(108deg,
      #061427 0%,
      #071a31 38%,
      #0a203a 67%,
      #0b2440 100%);
}

/* Obraz jest przypięty do prawej krawędzi.
   Jego wielkość zależy od viewportu zamiast stałej wartości. */
.main::before{
  inset:0 0 auto auto;
  width:clamp(700px,55vw,1020px);
  height:clamp(510px,40vw,742px);
  background-size:100% auto;
  background-position:right top;
  background-repeat:no-repeat;

  /* Miękkie zanikanie po lewej i u dołu bez ruszania samego kadru. */
  -webkit-mask-image:
    linear-gradient(90deg,
      transparent 0%,
      rgba(0,0,0,.10) 7%,
      rgba(0,0,0,.34) 17%,
      rgba(0,0,0,.78) 31%,
      #000 47%,
      #000 100%),
    linear-gradient(180deg,
      #000 0%,
      #000 65%,
      rgba(0,0,0,.92) 72%,
      rgba(0,0,0,.62) 84%,
      rgba(0,0,0,.18) 95%,
      transparent 100%);
  -webkit-mask-composite:source-in;

  mask-image:
    linear-gradient(90deg,
      transparent 0%,
      rgba(0,0,0,.10) 7%,
      rgba(0,0,0,.34) 17%,
      rgba(0,0,0,.78) 31%,
      #000 47%,
      #000 100%),
    linear-gradient(180deg,
      #000 0%,
      #000 65%,
      rgba(0,0,0,.92) 72%,
      rgba(0,0,0,.62) 84%,
      rgba(0,0,0,.18) 95%,
      transparent 100%);
  mask-composite:intersect;
}

/* Delikatna warstwa przejściowa spaja zdjęcie z resztą sceny.
   Nie wpływa na elementy UI, bo pozostaje pod nimi. */
.main::after{
  background:
    linear-gradient(90deg,
      rgba(251,253,255,.22) 0%,
      rgba(246,251,255,.13) 28%,
      rgba(237,247,253,.055) 52%,
      transparent 73%),
    linear-gradient(180deg,
      transparent 0%,
      transparent 55%,
      rgba(228,242,251,.08) 67%,
      rgba(220,238,250,.27) 82%,
      rgba(213,233,247,.48) 100%),
    radial-gradient(720px 390px at 48% 74%,
      rgba(255,255,255,.17),
      transparent 76%);
}

html[data-theme="dark"] .main::after{
  background:
    linear-gradient(90deg,
      rgba(5,18,36,.20) 0%,
      rgba(5,19,38,.10) 32%,
      rgba(6,22,43,.04) 56%,
      transparent 74%),
    linear-gradient(180deg,
      transparent 0%,
      transparent 57%,
      rgba(7,26,49,.10) 70%,
      rgba(7,29,54,.28) 84%,
      rgba(6,25,48,.46) 100%),
    radial-gradient(720px 390px at 48% 74%,
      rgba(27,62,108,.08),
      transparent 76%);
}

/* Duże monitory: większa scena, ale nadal proporcjonalna. */
@media(min-width:1800px){
  .main::before{
    width:clamp(900px,53vw,1120px);
    height:clamp(653px,38.5vw,812px);
  }
}

/* Typowy laptop / mniejszy desktop. */
@media(max-width:1439px){
  .main::before{
    width:clamp(650px,58vw,850px);
    height:clamp(472px,42vw,617px);
  }
}

/* Tablet poziomy / mały laptop. */
@media(max-width:1180px){
  .main::before{
    inset:0 -18px auto auto;
    width:clamp(560px,64vw,700px);
    height:clamp(406px,46vw,508px);
    opacity:.72;
  }
}

/* Tablet i telefon: obraz maleje, pozostaje tłem,
   nie wymusza zmiany układu treści. */
@media(max-width:820px){
  .main::before{
    inset:112px -28px auto auto;
    width:min(500px,88vw);
    height:min(363px,64vw);
    opacity:.25;
    background-position:right top;
  }

  .main{
    background:
      radial-gradient(560px 390px at 100% 17%,
        rgba(119,150,184,.13),
        transparent 70%),
      linear-gradient(150deg,#fbfdff 0%,#edf7fd 58%,#dceefa 100%);
  }

  html[data-theme="dark"] .main{
    background:
      radial-gradient(560px 390px at 100% 17%,
        rgba(45,78,119,.26),
        transparent 70%),
      linear-gradient(150deg,#061427 0%,#081b32 58%,#0a223e 100%);
  }
}

/* Telefon: jeszcze mniejszy, spokojniejszy kadr. */
@media(max-width:560px){
  .main::before{
    inset:126px -35px auto auto;
    width:min(430px,96vw);
    height:min(312px,70vw);
    opacity:.19;
  }
}

/* ==========================================================
   PORTAL 3.6 — RESPONSIVE LAYOUT TUNING
   Cel:
   - przesunąć blok hero bardziej w lewo na desktopie,
   - poprawić responsywność całości na tabletach i mniejszych laptopach,
   - zachować wygląd wyszukiwarki i panelu odpowiedzi.
   ========================================================== */

/* Desktop: tekst hero bardziej w lewo i odrobinę węższy,
   żeby nie wchodził wizualnie na postać. */
.hero-copy-main{
  width:min(610px,43%);
  margin-left:clamp(12px,1.4vw,28px);
}
.hero-copy-main p{
  max-width:520px;
}

/* Delikatne dopracowanie topbaru bez zmiany stylu. */
.topbar{
  min-width:0;
}
.top-cluster,
.top-actions{
  min-width:0;
}

/* Szersze laptopy i mniejsze desktopy. */
@media(max-width:1440px){
  .portal{grid-template-columns:232px minmax(0,1fr)}
  .main{padding:10px 16px 5px}
  .top-control{min-width:170px}
  .utility-control{min-width:138px}
  .hero-copy-main{
    width:min(590px,42%);
    margin-left:clamp(10px,1.2vw,20px);
  }
  .hero-copy-main h2{font-size:clamp(31px,3.05vw,50px)}
  .main::before{
    width:clamp(620px,57vw,860px);
    height:clamp(450px,41vw,625px);
  }
}

/* Tablet poziomy / mały laptop — całość układu skaluje się spokojniej. */
@media(max-width:1180px){
  body{overflow:auto}
  .portal{
    min-height:100vh;
    height:auto;
    grid-template-columns:202px minmax(0,1fr);
  }
  .sidebar{
    padding:18px 12px 12px;
    position:sticky;
    top:0;
    height:100vh;
  }
  .brand-main{font-size:32px}
  .brand-sub{font-size:10px}
  .nav-btn,
  .contact-control,
  .top-control,
  .utility-control{
    min-height:48px !important;
    height:48px;
  }
  .nav-btn .control-label,
  .topbar .control-label,
  .topbar .control-copy b{
    font-size:11.5px;
  }
  .topbar{
    align-items:flex-start;
    gap:10px;
  }
  .top-cluster{
    flex:1 1 auto;
    flex-wrap:wrap;
    gap:8px;
  }
  .top-control{
    min-width:150px;
    flex:0 1 160px;
  }
  .top-actions{
    flex:0 0 auto;
    margin-left:auto;
  }
  .utility-control{
    min-width:122px;
  }
  .main{
    min-height:100vh;
  }
  .stage{
    grid-template-rows:minmax(250px,auto) auto auto minmax(14px,.12fr) 30px;
    min-height:720px;
  }
  .hero-copy-main{
    width:min(500px,50%);
    margin:18px 0 18px 8px;
    padding-top:2px;
  }
  .hero-copy-main h2{font-size:clamp(29px,3.1vw,42px)}
  .hero-copy-main p{font-size:11.4px;max-width:440px}
  .main::before{
    inset:0 -12px auto auto;
    width:clamp(520px,60vw,700px);
    height:clamp(378px,43vw,508px);
    opacity:.76;
  }
}

/* Tablet pionowy i węższe układy: sidebar na górze, wszystko pełnej szerokości. */
@media(max-width:920px){
  .portal{display:block}
  .sidebar{
    position:relative;
    height:auto;
    padding:14px 12px 12px;
    border-right:0;
    border-bottom:1px solid rgba(65,111,165,.18);
  }
  .brand{padding:3px 6px 12px}
  .brand-main{font-size:34px}
  .nav{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px;
  }
  .nav-btn{
    min-width:0;
  }
  .sidebar-spacer,.contact-control,.demo-status,.project-version,.copyright{display:none}
  .main{
    padding:12px;
  }
  .topbar{
    flex-direction:column;
    align-items:stretch;
  }
  .top-cluster{
    width:100%;
    display:grid !important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:8px !important;
  }
  .top-control{
    width:100%;
    min-width:0;
    flex:none;
  }
  .top-actions{
    align-self:flex-end;
  }
  .stage{
    min-height:740px;
    grid-template-rows:minmax(224px,auto) auto auto minmax(14px,.12fr) 28px;
  }
  .hero-copy-main{
    width:min(500px,56%);
    margin:12px 0 14px 8px;
  }
  .hero-copy-main h2{font-size:clamp(27px,5vw,38px)}
  .hero-copy-main p{max-width:360px}
  .main::before{
    inset:82px -30px auto auto;
    width:min(510px,59vw);
    height:min(372px,43vw);
    opacity:.50;
  }
  .search-panel,.answer-panel,.feature-line{
    margin-left:8px;
    width:calc(100% - 16px);
  }
  .feature-line{
    grid-template-columns:1fr;
  }
  .feature-item + .feature-item{border-left:0}
  .footer{
    white-space:normal;
    flex-wrap:wrap;
    gap:8px;
    padding-bottom:8px;
  }
}

/* Telefony — obraz spokojnym tłem, treść czytelna i bez nachodzenia. */
@media(max-width:640px){
  .new-conversation-button{padding:6px 8px;font-size:8px}
  body{overflow:auto}
  .brand-main{font-size:30px}
  .nav{
    grid-template-columns:1fr;
  }
  .top-cluster{
    grid-template-columns:1fr !important;
  }
  .top-actions{
    width:100%;
    justify-content:flex-end;
  }
  .utility-control{
    min-width:110px;
    padding:0 12px !important;
  }
  .hero-copy-main{
    width:calc(100% - 16px);
    margin:10px 0 12px 8px;
  }
  .hero-copy-main h2{
    font-size:clamp(22px,8.2vw,32px);
    line-height:1.02;
  }
  .hero-copy-main p{
    max-width:none;
    font-size:11px;
  }
  .main::before{
    inset:108px -34px auto auto;
    width:min(420px,82vw);
    height:min(306px,60vw);
    opacity:.22;
  }
  .search-panel{
    min-height:104px;
    padding:12px;
    grid-template-columns:minmax(0,1fr) auto;
    gap:10px;
  }
  .search-spark{display:none}
  .search-content textarea{
    height:70px;
    font-size:14px;
  }
  .answer-header{
    padding:12px 14px;
    gap:10px;
  }
  .ai-orb{
    width:50px;
    height:50px;
    flex-basis:50px;
    font-size:24px;
  }
  .answer-heading h2{font-size:18px}
  .answer-body{padding:12px 14px 14px}
}

/* Bardzo małe telefony. */
@media(max-width:420px){
  .main{padding:10px}
  .top-actions{gap:6px}
  .utility-control{
    min-width:52px;
    width:52px;
    padding:0 !important;
    justify-content:center;
  }
  .utility-control .control-label,
  .utility-control .control-arrow{display:none}
  .top-control .control-copy small{display:none}
  .hero-copy-main{
    width:calc(100% - 12px);
    margin-left:6px;
  }
  .hero-eyebrow{font-size:8px;padding:5px 8px}
  .hero-copy-main h2{font-size:clamp(20px,9vw,28px)}
  .search-panel,.answer-panel,.feature-line{
    width:calc(100% - 12px);
    margin-left:6px;
  }
  .main::before{
    inset:118px -28px auto auto;
    width:min(360px,86vw);
    height:min(262px,63vw);
    opacity:.18;
  }
}

/* ==========================================================
   PORTAL 3.7 — BRAND REFINEMENT
   - usuwa pionową kreskę między sidebar a sceną,
   - centruje sekcję marki,
   - zamienia "by DŻUMA" w prosty animowany badge.
   ========================================================== */

/* Usuń niechcianą pionową kreskę po prawej stronie sidebaru. */
.sidebar{
  border-right:none !important;
  box-shadow:none !important;
}

/* Spójne wyjustowanie / wycentrowanie sekcji logo. */
.brand{
  padding:8px 8px 28px !important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:10px;
}
.brand-main{
  width:100%;
  text-align:center;
}

/* Animowany wizualny badge dla "by DŻUMA". */
.brand-sub{
  margin-top:0 !important;
  position:relative;
  align-self:center;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:122px;
  min-height:34px;
  padding:7px 16px;
  border-radius:999px;
  text-align:center;
  letter-spacing:.16em;
  font-size:10px !important;
  font-weight:850 !important;
  color:var(--text);
  background:linear-gradient(135deg,rgba(255,255,255,.76),rgba(233,245,255,.54));
  border:1px solid rgba(65,111,165,.25);
  box-shadow:0 8px 18px rgba(59,93,139,.08), inset 0 1px 0 rgba(255,255,255,.65);
  transform-origin:center center;
  animation:brandDzumaSwing 4.2s ease-in-out infinite;
  will-change:transform;
}
.brand-sub::before{
  content:"";
  position:absolute;
  inset:-4px;
  border-radius:inherit;
  border:1px dashed rgba(174,124,45,.28);
  opacity:.75;
}
.brand-sub::after{
  content:"";
  position:absolute;
  inset:2px;
  border-radius:inherit;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.25);
  pointer-events:none;
}
html[data-theme="dark"] .brand-sub{
  color:#eef6ff;
  background:linear-gradient(135deg,rgba(22,44,77,.82),rgba(15,31,58,.58));
  border-color:rgba(114,156,214,.34);
  box-shadow:0 8px 18px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.06);
}
html[data-theme="dark"] .brand-sub::before{
  border-color:rgba(223,181,101,.32);
}

@keyframes brandDzumaSwing{
  0%{transform:rotate(-14deg) translateX(-3px)}
  50%{transform:rotate(14deg) translateX(3px)}
  100%{transform:rotate(-14deg) translateX(-3px)}
}

@media (prefers-reduced-motion: reduce){
  .brand-sub{animation:none}
}

/* Na małych ekranach utrzymaj czytelność badge. */
@media(max-width:920px){
  .brand{padding:6px 8px 18px !important}
  .brand-sub{min-width:112px; min-height:30px; font-size:9px !important;}
}


/* ==========================================================
   PORTAL 3.8 — FULL RESPONSIVE APP
   Desktop 3.7 pozostaje bazą. Poniższe reguły dotyczą głównie
   laptopów, tabletów i telefonów oraz skalowania całej aplikacji.
   ========================================================== */

/* Płynne wartości wspólne dla całego interfejsu. */
:root{
  --responsive-page-pad:clamp(10px,1.15vw,21px);
  --responsive-gap:clamp(6px,.7vw,12px);
}

.main{padding-left:var(--responsive-page-pad);padding-right:var(--responsive-page-pad)}

/* Mniejszy desktop / laptop */
@media (max-width:1440px){
  .portal{grid-template-columns:clamp(210px,16.2vw,238px) minmax(0,1fr)}
  .sidebar{padding:clamp(18px,2vw,25px) 14px 13px}
  .brand-main{font-size:clamp(31px,2.7vw,36px)}
  .brand-sub{min-width:110px;min-height:31px;font-size:9px!important}

  .topbar{gap:10px}
  .top-cluster,.top-actions{gap:7px!important}
  .top-control{min-width:clamp(150px,13vw,178px);height:48px!important;min-height:48px!important}
  .utility-control{min-width:118px;height:48px!important;min-height:48px!important}
  .control-copy b,.control-label{font-size:11.5px}
  .control-copy small{font-size:8.4px}

  .stage{grid-template-rows:minmax(225px,1fr) auto auto minmax(16px,.15fr) 30px}
  .hero-copy-main{width:min(565px,43%);margin-left:clamp(8px,1.25vw,18px)}
  .hero-copy-main h2{font-size:clamp(30px,3.05vw,47px)}
  .hero-copy-main p{font-size:11.4px;max-width:475px}

  .search-panel{width:min(980px,78%);min-height:104px;margin-left:clamp(8px,1.25vw,18px)}
  .search-content textarea{height:68px;font-size:14px}
  .answer-panel{width:min(930px,74%);margin-left:clamp(8px,1.25vw,18px)}
  .feature-line{width:min(1010px,79%);margin-left:clamp(8px,1.25vw,18px)}
}

/* Tablet poziomy / mały laptop */
@media (max-width:1180px){
  body{overflow:auto}
  .portal{
    width:100%;
    min-height:100dvh;
    height:auto;
    grid-template-columns:clamp(188px,18vw,210px) minmax(0,1fr);
  }
  .sidebar{
    position:sticky;
    top:0;
    height:100dvh;
    padding:18px 11px 12px;
  }
  .brand{padding:5px 4px 18px!important}
  .brand-main{font-size:30px}
  .brand-sub{min-width:102px;min-height:29px;padding:6px 12px;font-size:8.5px!important}
  .nav{gap:7px}
  .nav-btn{height:46px!important;min-height:46px!important;padding:0 10px!important}
  .nav-btn .control-label{font-size:10.8px}
  .icon-slot{width:21px;height:21px;flex-basis:21px}
  .icon-svg{width:18px;height:18px}

  .main{
    display:grid;
    min-height:100dvh;
    height:auto;
    padding:10px 12px 6px;
    grid-template-rows:auto minmax(0,1fr) auto;
  }
  .topbar{align-items:flex-start;gap:8px;margin-bottom:8px}
  .top-cluster{flex:1 1 auto;flex-wrap:wrap}
  .top-control{min-width:138px;flex:0 1 155px;height:46px!important;min-height:46px!important;padding:0 10px!important}
  .top-actions{flex:0 0 auto;margin-left:auto}
  .utility-control{min-width:108px;height:46px!important;min-height:46px!important;padding:0 10px!important}

  .stage{min-height:690px;grid-template-rows:minmax(220px,auto) auto auto minmax(12px,.10fr) 28px}
  .hero-copy-main{width:min(455px,49%);margin:14px 0 14px 7px;padding:2px 0 12px}
  .hero-eyebrow{min-height:25px;padding:4px 8px;font-size:8px}
  .hero-copy-main h2{font-size:clamp(28px,3.5vw,39px);margin:10px 0 7px}
  .hero-copy-main p{font-size:10.8px;max-width:390px}

  .main::before{width:clamp(500px,61vw,680px);height:clamp(363px,44vw,494px);opacity:.68}

  .search-panel,.answer-panel,.feature-line{margin-left:7px}
  .search-panel{width:calc(100% - 20px);max-width:none}
  .answer-panel{width:calc(94% - 10px);max-width:none}
  .feature-line{width:calc(100% - 20px)}
  .footer{font-size:6.5px;gap:8px;white-space:normal;flex-wrap:wrap;text-align:center}
}

/* Tablet pionowy — cały interfejs przechodzi w układ pionowy. */
@media (max-width:920px){
  .portal{display:block;min-height:100dvh}
  .sidebar{
    position:relative;
    height:auto;
    padding:11px 12px 10px;
    border-bottom:1px solid rgba(86,116,154,.13);
  }
  .brand{
    padding:2px 6px 10px!important;
    flex-direction:row;
    justify-content:center;
    gap:14px;
  }
  .brand-main{width:auto;font-size:28px}
  .brand-sub{min-width:94px;min-height:28px;padding:5px 10px}
  .nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;overflow:visible}
  .nav-btn{height:46px!important;min-height:46px!important;justify-content:center;text-align:center}
  .sidebar-spacer,.contact-control,.demo-status,.project-version,.copyright{display:none}

  .main{padding:10px;min-height:auto}
  .topbar{flex-direction:column;align-items:stretch;gap:7px}
  .top-cluster{
    width:100%;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:7px!important;
  }
  .top-control{width:100%;min-width:0;height:48px!important;min-height:48px!important}
  .top-actions{align-self:flex-end;margin:0}
  .utility-control{height:46px!important;min-height:46px!important}

  .stage{min-height:auto;display:grid;grid-template-rows:auto auto auto 18px auto;overflow:visible}
  .hero-copy-main{width:min(520px,63%);margin:18px 0 14px 6px;padding:0 0 10px}
  .hero-copy-main h2{font-size:clamp(27px,5.4vw,39px)}
  .hero-copy-main p{font-size:11px;max-width:430px}

  .main::before{inset:90px -24px auto auto;width:min(500px,60vw);height:min(363px,44vw);opacity:.43}

  .search-panel{grid-row:2;width:calc(100% - 12px);margin:0 6px;min-height:108px}
  .answer-panel{grid-row:3;width:calc(100% - 12px);margin:10px 6px 0;max-height:48vh}
  .answer-panel.has-content{max-height:48vh}
  .feature-line{grid-row:5;width:calc(100% - 12px);margin:10px 6px 0;min-height:44px}
  .footer{padding:8px 6px 10px;line-height:1.45}
}

/* Telefon */
@media (max-width:640px){
  .sidebar{padding:9px 9px 8px}
  .brand{gap:10px;padding-bottom:8px!important}
  .brand-main{font-size:25px}
  .brand-sub{min-width:82px;min-height:26px;font-size:7.6px!important;letter-spacing:.12em}

  .nav{grid-template-columns:1fr;gap:6px}
  .nav-btn{justify-content:flex-start;text-align:left;padding:0 13px!important}
  .nav-btn .control-label{font-size:11.3px}

  .main{padding:8px}
  .top-cluster{grid-template-columns:1fr!important}
  .top-control{height:50px!important;min-height:50px!important}
  .top-control .control-copy small{display:block;font-size:8.2px}
  .top-actions{width:100%;justify-content:flex-end;gap:6px!important}
  .utility-control{min-width:104px;height:44px!important;min-height:44px!important}

  .hero-copy-main{width:calc(100% - 8px);margin:14px 4px 12px;padding:0}
  .hero-eyebrow{font-size:7.5px;letter-spacing:.09em}
  .hero-copy-main h2{font-size:clamp(24px,8vw,32px);line-height:1.02;letter-spacing:-.035em}
  .hero-copy-main p{font-size:10.8px;line-height:1.5;max-width:none}
  .main::before{inset:150px -38px auto auto;width:min(410px,88vw);height:min(298px,64vw);opacity:.17}

  .search-panel{
    width:calc(100% - 8px);
    margin:0 4px;
    min-height:102px;
    padding:10px 10px 9px;
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
    border-radius:18px;
  }
  .search-spark{display:none}
  .search-content textarea{height:66px;font-size:13.5px}
  .search-hint{font-size:7.8px}
  .send-control{width:48px!important;min-width:48px!important;height:48px!important;min-height:48px!important}

  .answer-panel{width:calc(100% - 8px);margin:8px 4px 0;border-radius:18px}
  .answer-header{min-height:82px;padding:10px 12px;gap:10px}
  .answer-panel.is-empty{min-height:82px}
  .ai-orb{width:48px;height:48px;flex-basis:48px;font-size:23px}
  .answer-kicker{font-size:7.8px}
  .answer-heading h2{font-size:17px;line-height:1.15}
  .answer-heading p{font-size:8.4px}
  .answer-body{padding:10px 12px 13px;font-size:11px}
  .demo-response{font-size:10.8px}

  .feature-line{width:calc(100% - 8px);margin:10px 4px 0;grid-template-columns:1fr;gap:2px;padding:5px 0}
  .feature-item{min-height:30px;justify-content:flex-start;padding:0 8px}
  .feature-item+.feature-item{border-left:0}
  .footer{display:flex;font-size:6.4px}
}

/* Bardzo mały telefon */
@media (max-width:420px){
  .brand-main{font-size:23px}
  .brand-sub{min-width:76px;min-height:24px;font-size:7px!important}
  .top-actions{justify-content:space-between}
  .utility-control{width:calc(50% - 3px);min-width:0!important;justify-content:center}
  .utility-control .control-label{display:inline!important}
  .utility-control .control-arrow{display:none}
  .hero-copy-main h2{font-size:clamp(22px,8.6vw,29px)}
  .main::before{inset:160px -32px auto auto;width:min(350px,90vw);height:min(254px,66vw);opacity:.14}
  .search-panel{min-height:98px}
  .search-content textarea{height:62px;font-size:13px}
  .answer-heading h2{font-size:16px}
}


/* ==========================================================
   PORTAL 4.0 AI CONNECTED — UX FIXES
   Baza: 3.9 BRAND SWING AI CONNECTED
   ========================================================== */

/* Strukturalny <main> nie powinien dostawać niebieskiej ramki.
   Focus dla faktycznie interaktywnych elementów pozostaje bez zmian. */
#main:focus,
#main:focus-visible{
  outline:none !important;
}

/* Długa odpowiedź rozszerza stronę zamiast tworzyć okno w oknie. */
html,
body{
  min-height:100%;
}
body{
  overflow-x:hidden;
  overflow-y:auto !important;
}
.portal{
  height:auto !important;
  min-height:100dvh;
}
.main{
  height:auto !important;
  min-height:100dvh;
}
.stage{
  overflow:visible !important;
}

/* Pole pytania rośnie z treścią. Scrollbar nie jest potrzebny.
   Enter wysyła, Shift+Enter zostawia świadomą nową linię. */
.search-content textarea{
  height:auto !important;
  min-height:68px;
  max-height:none !important;
  overflow:hidden !important;
  scrollbar-width:none !important;
}
.search-content textarea::-webkit-scrollbar{
  display:none !important;
}

/* Odpowiedź ma naturalną wysokość zależną od ilości treści. */
.answer-panel,
.answer-panel.is-empty,
.answer-panel.has-content{
  max-height:none !important;
  height:auto !important;
  overflow:visible !important;
}
.answer-panel.has-content{
  min-height:190px;
}
.answer-body{
  overflow:visible !important;
  max-height:none !important;
  height:auto !important;
  scrollbar-width:none !important;
  overflow-wrap:anywhere;
  word-break:normal;
}
.answer-body::-webkit-scrollbar{
  display:none !important;
}

/* Usuwamy wewnętrzną linię między nagłówkiem a treścią odpowiedzi,
   żeby panel wyglądał jak jeden blok. */
.answer-panel.has-content .answer-header{
  border-bottom:none !important;
}

/* Przy długiej treści dolne elementy układają się naturalnie poniżej. */
.feature-line,
.footer{
  position:relative;
}

@media(max-width:920px){
  .answer-panel,
  .answer-panel.has-content{
    max-height:none !important;
  }
}

/* Telefon: prostszy pasek narzędzi i wyłącznie jasny wygląd. */
@media(max-width:640px){
  html,body{
    width:100%!important;
    max-width:100%!important;
    overflow-x:hidden!important;
    overflow-x:clip!important;
    overscroll-behavior-x:none;
  }
  body,.portal,.main{touch-action:pan-y pinch-zoom}
  .portal,.main,.stage{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .portal,.main{overflow-x:hidden!important;overflow-x:clip!important}
  .main::before{
    right:0!important;
    max-width:100%!important;
  }
  .sidebar .brand{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:center!important;
    flex-wrap:nowrap!important;
    gap:8px!important;
    width:100%!important;
    padding:2px 4px 9px!important;
  }
  .sidebar .brand-main{width:auto!important;flex:0 0 auto}
  .sidebar .brand-sub{flex:0 0 auto}
  .sidebar .brand #accountButton{
    display:flex!important;
    width:auto!important;
    min-width:102px!important;
    height:40px!important;
    min-height:40px!important;
    margin:0!important;
    padding:0 9px!important;
    gap:6px!important;
    justify-content:center!important;
  }
  .sidebar .brand #accountButton .icon-slot{width:20px;height:20px;flex-basis:20px}
  .sidebar .brand #accountButton .control-label{font-size:10px!important;white-space:nowrap}
  .sidebar .brand #accountButton .control-arrow{display:none!important}
  #themeButton{display:none!important}
  .topbar{display:none!important}
  .stage{display:flex!important;flex-direction:column!important}
  .stage>.hero-copy-main{order:auto!important}
  .stage>.nav{
    order:auto!important;
    width:calc(100% - 8px);
    margin:0 4px 8px;
  }
  .stage>.top-cluster{
    order:auto!important;
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:calc(100% - 8px);
    margin:0 4px 12px;
    gap:6px!important;
  }
  .stage>.top-cluster .top-control,
  .stage>.top-cluster #accountButton{
    width:100%!important;
    min-width:0!important;
    height:46px!important;
    min-height:46px!important;
    margin:0!important;
    padding:0 8px!important;
    cursor:pointer;
  }
  .stage>.top-cluster .top-control-static{cursor:pointer!important}
  .stage>.top-cluster>a.top-control{grid-column:auto!important}
  .stage>.top-cluster #accountButton .control-arrow{display:none}
  .stage>.top-cluster .icon-slot{width:25px;height:25px;flex-basis:25px}
  .stage>.top-cluster .control-copy b,
  .stage>.top-cluster #accountButton .control-label{font-size:10.5px!important}
  .stage>.top-cluster .control-copy small{display:none!important}
  .stage>.top-cluster .control-arrow{margin-left:2px!important}
  .stage>.search-panel,
  .stage>.answer-panel,
  .stage>.feature-line{order:auto!important}
  .search-content,
  .search-content textarea,
  .answer-body{min-width:0!important;max-width:100%!important}
  .send-control{
    color:var(--blue)!important;
    background:rgba(255,255,255,.78)!important;
    border-color:rgba(65,111,190,.38)!important;
    box-shadow:none!important;
  }
  .send-control.has-question:not(:disabled){
    color:#fff!important;
    background:linear-gradient(135deg,var(--blue),var(--cyan))!important;
    border-color:rgba(79,133,233,.58)!important;
    box-shadow:0 9px 22px rgba(28,84,218,.24)!important;
  }
}

/* Końcowe nadpisania 4.20 muszą pozostać po regułach responsywnych. */
.search-panel{z-index:120}
.search-panel.conversation-active{display:grid!important}
.error-rule-results{z-index:320}
.answer-panel{z-index:2}
.demo-response{
  color:var(--muted);
  font-family:"Segoe UI",Inter,Arial,sans-serif;
  font-size:14px;
  font-weight:400;
  line-height:1.65;
}
.demo-response p{margin:0 0 11px;font-weight:400}
.demo-response h3{margin:18px 0 7px;color:var(--text);font-size:14px;font-weight:750;line-height:1.35}
.demo-response h3:first-child{margin-top:0}
.demo-response ul,.demo-response ol{margin:5px 0 13px;padding-left:24px}
.demo-response li{margin:5px 0;padding-left:2px;font-weight:400}
.chat-message{margin-bottom:16px}
.chat-bubble{padding:15px 17px}
.chat-message-user .chat-bubble>p{font-size:13px;font-weight:500;line-height:1.5}
@media(max-width:640px){
  .demo-response{font-size:13px;line-height:1.58}
  .chat-bubble{padding:12px 13px}
  .chat-composer{margin:0 12px 14px;padding:11px}
}

/* Finalna geometria 4.20 — dotyczy wyłącznie prawego obszaru portalu. */
@media(min-width:921px){
  .topbar{min-height:46px;gap:9px}
  .top-cluster,.top-actions{gap:6px!important}
  .top-control{min-width:148px!important;height:44px!important;min-height:44px!important;padding:0 10px!important}
  .utility-control{height:44px!important;min-height:44px!important;padding:0 11px!important}
  .topbar .control-label,.topbar .control-copy b{font-size:11px!important}
  .topbar .control-copy small{font-size:8px!important}
  .search-panel{
    width:calc(100% - 32px)!important;
    max-width:none!important;
    min-height:86px!important;
    margin-left:16px!important;
    padding:9px 13px 8px 16px!important;
    border-radius:20px!important;
    gap:10px!important;
  }
  .search-content textarea{
    min-height:46px!important;
    max-height:58px!important;
    height:46px!important;
    overflow-y:auto!important;
    padding:3px 0!important;
    font-size:13px!important;
    line-height:1.42!important;
  }
  .search-hint{font-size:8px!important}
  .send-control{width:46px!important;min-width:46px!important;height:46px!important;min-height:46px!important}
  .answer-panel{width:calc(100% - 32px)!important;max-width:none!important;margin-left:16px!important}
  .chat-composer{margin-left:72px;margin-right:18px}
}
html[data-theme="light"] .send-control{color:#111827!important}
html[data-theme="dark"] .send-control{color:#f8fbff!important}
html[data-theme="light"] #accountButton .control-label{color:#111827!important}
html[data-theme="dark"] #accountButton .control-label{color:#f8fbff!important}
html[data-theme="light"] #accountModal .dialog-primary{color:#111827!important}
html[data-theme="dark"] #accountModal .dialog-primary{color:#fff!important}
html[data-theme="light"] #premiumModal .dialog-primary{color:#111827!important}
html[data-theme="dark"] #premiumModal .dialog-primary{color:#fff!important}

/* 4.20 — czytelne wyszukiwanie błędów bez nakładania pustej odpowiedzi. */
.answer-panel.error-search-open.is-empty{visibility:hidden;pointer-events:none}
.error-rule-results{
  left:16px!important;
  right:16px!important;
  top:calc(100% + 10px)!important;
  max-height:min(430px,50vh)!important;
  padding:12px!important;
  border-radius:18px!important;
  backdrop-filter:none!important;
  background:#f7fbff!important;
  border:1px solid #8fb7ff!important;
  box-shadow:0 20px 48px rgba(18,39,76,.28)!important;
}
html[data-theme="dark"] .error-rule-results{
  background:#07172d!important;
  border-color:#557cc2!important;
  box-shadow:0 22px 52px rgba(0,0,0,.46)!important;
}
.error-rule-results-header{
  position:sticky;
  top:-12px;
  z-index:2;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:-12px -12px 9px;
  padding:12px 14px 10px;
  border-bottom:1px solid var(--panel-border);
  border-radius:18px 18px 0 0;
  color:var(--text);
  background:#f7fbff;
}
html[data-theme="dark"] .error-rule-results-header{background:#07172d}
.error-rule-results-header strong{font-size:13px;line-height:1.35}
.error-rule-results-header span{color:var(--muted);font-size:10px;white-space:nowrap}
.error-rule-option{
  grid-template-columns:minmax(100px,auto) 1fr!important;
  gap:5px 12px!important;
  margin:5px 0!important;
  padding:12px 14px!important;
  border:1px solid var(--panel-border)!important;
  border-radius:13px!important;
  background:var(--panel-bg-soft)!important;
}
.error-rule-option:hover,.error-rule-option:focus-visible{
  border-color:var(--blue)!important;
  background:color-mix(in srgb,var(--blue) 11%,var(--panel-bg-soft))!important;
}
.error-rule-option strong{font-size:14px!important;line-height:1.3}
.error-rule-type{font-size:9px!important;line-height:1.35}
.error-rule-message{font-size:12.5px!important;line-height:1.5!important;color:var(--text)!important}
.error-rule-option mark{
  padding:0 2px;
  border-radius:3px;
  color:#111827;
  background:#ffe08a;
}
.new-conversation-button{font-weight:800}

/* 4.25 — kompaktowy blok wprowadzający, więcej miejsca na funkcje */
@media(min-width:921px){
  .stage{
    grid-template-rows:minmax(145px,auto) auto auto minmax(10px,.08fr) 28px!important;
  }
  .hero-copy-main{
    width:min(520px,40%)!important;
    margin:3px 0 7px 16px!important;
    padding:0!important;
    align-self:center!important;
  }
  .hero-eyebrow{
    min-height:22px!important;
    padding:3px 8px!important;
    gap:5px!important;
    font-size:7.5px!important;
    letter-spacing:.10em!important;
  }
  .hero-copy-main h2{
    margin:7px 0 5px!important;
    font-size:clamp(26px,2.15vw,36px)!important;
    line-height:1.04!important;
    letter-spacing:-.035em!important;
  }
  .hero-copy-main p{
    max-width:470px!important;
    font-size:10.5px!important;
    line-height:1.42!important;
  }
}

@media(max-width:920px){
  .hero-copy-main{
    margin:9px 6px 8px!important;
    padding:0!important;
  }
  .hero-eyebrow{
    min-height:22px!important;
    padding:3px 7px!important;
    font-size:7.5px!important;
  }
  .hero-copy-main h2{
    margin:6px 0 4px!important;
    font-size:clamp(23px,4.2vw,31px)!important;
    line-height:1.04!important;
  }
  .hero-copy-main p{
    font-size:10px!important;
    line-height:1.4!important;
  }
}

@media(max-width:640px){
  .hero-copy-main{
    width:calc(100% - 8px)!important;
    margin:7px 4px 7px!important;
  }
  .hero-copy-main h2{font-size:clamp(20px,6.8vw,26px)!important}
  .hero-copy-main p{font-size:9.5px!important}
}

/* 4.25 — finalny, zaakceptowany kadr i płynne połączenie sceny. */
.mobile-feature-summary{display:none}

@media(min-width:921px){
  /* Tekst jest kompaktowy, ale fotografia zachowuje osobną strefę dla twarzy. */
  .stage{
    grid-template-rows:minmax(225px,auto) auto auto minmax(10px,.08fr) 28px!important;
  }
  .main::before{
    width:clamp(620px,43vw,760px)!important;
    height:clamp(450px,31.1vw,552px)!important;
    background-position:right top!important;
  }
  .main::after{
    background:
      linear-gradient(90deg,rgba(251,253,255,.38) 0%,rgba(246,251,255,.22) 30%,rgba(237,247,253,.08) 55%,transparent 76%),
      linear-gradient(180deg,transparent 0%,transparent 58%,rgba(226,241,251,.14) 72%,rgba(214,234,248,.54) 100%),
      radial-gradient(760px 410px at 48% 76%,rgba(255,255,255,.20),transparent 76%)!important;
  }
  html[data-theme="dark"] .main::after{
    background:
      linear-gradient(90deg,rgba(5,18,36,.30) 0%,rgba(5,19,38,.16) 34%,rgba(6,22,43,.05) 58%,transparent 77%),
      linear-gradient(180deg,transparent 0%,transparent 58%,rgba(7,26,49,.14) 72%,rgba(6,25,48,.55) 100%),
      radial-gradient(760px 410px at 48% 76%,rgba(27,62,108,.09),transparent 76%)!important;
  }
}

/* Gradient wychodzi poza panel boczny, dzięki czemu nie ma pionowego odcięcia. */
@media(min-width:921px){
  .sidebar{position:relative;z-index:3}
  .sidebar::after{
    content:"";
    position:absolute;
    z-index:-1;
    inset:0 -52px 0 auto;
    width:72px;
    pointer-events:none;
    background:linear-gradient(90deg,rgba(244,250,255,.88),rgba(244,250,255,.42) 55%,transparent);
  }
  html[data-theme="dark"] .sidebar::after{
    background:linear-gradient(90deg,rgba(5,20,40,.84),rgba(5,20,40,.38) 55%,transparent);
  }
}

@media(max-width:640px){
  /* Na telefonie fotografia jest wyłączona — pozostaje czysty gradient. */
  .main::before{display:none!important}

  .main{
    background:
      radial-gradient(520px 330px at 100% 8%,rgba(127,164,202,.13),transparent 72%),
      linear-gradient(150deg,#fbfdff 0%,#edf7fd 58%,#dceefa 100%)!important;
  }
  html[data-theme="dark"] .main{
    background:
      radial-gradient(520px 330px at 100% 8%,rgba(47,83,126,.25),transparent 72%),
      linear-gradient(150deg,#061427 0%,#081b32 58%,#0a223e 100%)!important;
  }

  /* Trzy wysokie pozycje zastępuje jeden, mały i czytelny wiersz. */
  .feature-line{
    display:block!important;
    min-height:0!important;
    margin-top:9px!important;
    padding:9px 6px 7px!important;
    border-top:1px solid var(--panel-border)!important;
    background:transparent!important;
    border-radius:0!important;
  }
  .feature-item{display:none!important}
  .mobile-feature-summary{
    display:block;
    margin:0;
    color:var(--muted);
    font-size:9px;
    font-weight:650;
    line-height:1.45;
    text-align:center;
  }
  .mobile-feature-summary span{padding:0 3px;color:var(--gold)}
  .footer{display:none!important}
}

/* 4.42 — scoped search field repair; retain focus on all other controls. */
body.nfz-ui #questionForm {
  padding: 12px 14px !important;
}
body.nfz-ui #questionForm:focus-within {
  outline: none;
}
body.nfz-ui #questionForm:has(#question:focus) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
body.nfz-ui #questionForm .search-content {
  row-gap: 6px;
}
body.nfz-ui #question {
  box-sizing: border-box;
  min-height: 48px !important;
  max-height: 132px !important;
  height: 48px !important;
  padding: 6px 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 16px !important;
  line-height: 1.45 !important;
  overflow-y: auto !important;
  scrollbar-width: thin !important;
}
body.nfz-ui #question::-webkit-scrollbar {
  display: block !important;
  width: 6px;
}
body.nfz-ui #searchHint {
  font-size: 12px !important;
  line-height: 1.4 !important;
}
body.nfz-ui #errorQuestionChoice {
  gap: 8px;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.4;
}
body.nfz-ui #errorQuestionChoice .error-choice-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.4;
}
@media (max-width: 920px) {
  body.nfz-ui #question { min-height: 70px !important; }
  body.nfz-ui #errorQuestionChoice .error-choice-button { min-height: 44px; }
}

/* 4.43 — one composer: the initial search form leaves the conversation view. */
body.nfz-ui #questionForm[hidden] { display: none !important; }

/* 4.44 — collected owner review: no extra search outlines, one end button. */
body.nfz-ui #questionForm:focus-within,
body.nfz-ui #questionForm:has(#question:focus),
body.nfz-ui #followupForm:focus-within {
  outline: none !important;
}
body.nfz-ui #followupQuestion {
  outline: none !important;
  box-shadow: none !important;
  font-size: 16px !important;
}
body.nfz-ui #followupForm {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) 44px;
  gap: 10px !important;
  width: 100% !important;
  max-width: 900px;
  padding: 12px !important;
}
body.nfz-ui #followupQuestion { grid-column: 1; grid-row: 1; width: 100%; min-width: 0; }
body.nfz-ui #followupForm .followup-send { grid-column: 2; grid-row: 1; align-self: center; }
body.nfz-ui #followupForm .followup-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}
body.nfz-ui #newConversationButton { min-height: 40px; padding: 8px 14px; font-size: 13px; }
body.nfz-ui .demo-response { font-size: 16px !important; line-height: 1.7 !important; color: var(--text); }
body.nfz-ui .demo-response p { margin: 0 0 16px; }
body.nfz-ui .demo-response h3 { font-size: 17px; line-height: 1.4; margin: 24px 0 10px; }
body.nfz-ui .demo-response h3:first-child { margin-top: 0; }
body.nfz-ui .demo-response ul, body.nfz-ui .demo-response ol { margin: 8px 0 18px; }
body.nfz-ui .demo-response li { margin: 8px 0; }
body.nfz-ui .answer-sources { font-size: 13px; line-height: 1.55; margin-top: 18px; }
body.nfz-ui .answer-sources h3 { font-size: 14px; margin: 0 0 10px; }
body.nfz-ui .answer-sources li { margin: 8px 0; }
body.nfz-ui .answer-sources p { margin: 3px 0 10px; }
