:root {
  --bg: #fdf8f3;
  --card: #ffffff;
  --ink: #1b1f24;
  --ink-soft: #5b6570;
  --ink-muted: #9ca3af;
  --line: #e8ddd2;
  --line-light: #f0f1f3;
  --accent: #f08c00;
  --accent-hover: #d97a00;
  --accent-soft: rgba(240,140,0,.07);
  --accent-soft-solid: #fff4e6;
  --black: #111111;
  --nav-bg: #111111;
  --hero-bg: #1d1d1e;
  --sidebar-bg: #f5f5f3;
  --prawo: #c92a2a;
  --prawo-soft: #fff0f0;
  --rynek: #2f855a;
  --rynek-soft: #e8f5ee;
  --praktyka: #f08c00;
  --tech: #2b6cb0;
  --tech-soft: #eaf2fb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.05);
  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 0 0 1px rgba(0,0,0,.03);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

/* ═══════════ NAV ═══════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 28px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--accent) 40%, #7f8c8d);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .75rem;
}

.nav-logo .name { font-size: .95rem; font-weight: 600; }

.nav-tabs {
  display: flex; gap: 2px;
  margin-left: 12px;
}

.nav-tab {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: .85rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  text-decoration: none;
  transition: all .15s;
}

.nav-tab:hover { color: rgba(255,255,255,.8); background: rgba(255,255,255,.06); }

.nav-tab.on {
  color: #fff;
  background: rgba(240,140,0,.18);
}

.nav-tab.on::after {
  content: '';
  display: block;
  margin: 4px auto -7px;
  width: 24px; height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.6);
  font-size: .84rem;
}

.nav-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 600;
  color: rgba(255,255,255,.7);
}

/* ═══════════ HERO ═══════════ */
.hero {
  background: var(--hero-bg);
  padding: 38px 24px 34px;
  color: #fff;
  overflow: hidden;
  position: relative;
}

.hero-inner {
  max-width: 920px;
  margin-left: 232px; /* offset for sidebar */
  position: relative;
  z-index: 2;
}

.hero-motto {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.015em;
  margin-bottom: 8px;
}

.hero-sub {
  font-size: .92rem;
  color: rgba(255,255,255,.76);
  line-height: 1.55;
  max-width: 860px;
}

.hero-radar {
  --radar-ring: rgba(240,140,0,.48);
  --radar-ring-strong: rgba(240,140,0,.62);
  --radar-cross: rgba(255,255,255,.22);
  --radar-beam: rgba(240,140,0,.58);
  --radar-beam-soft: rgba(240,140,0,0);
  --radar-blip: rgba(255,244,230,1);
  --radar-glow: rgba(240,140,0,.76);
  position: absolute;
  top: -128px;
  right: -18px;
  width: 390px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  opacity: .34;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(240,140,0,.20), transparent 58%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.08), transparent 70%);
  box-shadow:
    inset 0 0 46px rgba(0,0,0,.38),
    0 0 0 1px rgba(240,140,0,.34);
}

.hero-radar-grid {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, var(--radar-ring) 0 1px, transparent 1px 19%),
    linear-gradient(var(--radar-cross), var(--radar-cross)) 50% 50% / 100% 1px no-repeat,
    linear-gradient(90deg, var(--radar-cross), var(--radar-cross)) 50% 50% / 1px 100% no-repeat;
}

.hero-radar-sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--radar-beam) 0deg, var(--radar-beam-soft) 68deg, transparent 68deg 360deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 0 66%, transparent 82%);
          mask: radial-gradient(circle at 50% 50%, #000 0 66%, transparent 82%);
  transform-origin: 50% 50%;
  animation: heroRadarSweep 13s linear infinite;
}

.hero-radar-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--radar-blip);
  box-shadow: 0 0 14px 2px var(--radar-glow);
}

.hero-radar-blip {
  position: absolute;
  left: var(--left);
  top: var(--top);
  width: var(--size, 7px);
  height: var(--size, 7px);
  border-radius: 50%;
  background: var(--radar-blip);
  box-shadow: 0 0 10px 2px var(--radar-glow);
  transform: translate(-50%, -50%) scale(.45);
  opacity: 0;
  animation: heroRadarBlip 13s linear infinite;
  animation-delay: var(--delay, 0s);
}

@keyframes heroRadarSweep {
  to { transform: rotate(360deg); }
}

@keyframes heroRadarBlip {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.45); }
  1.3% { opacity: .9; transform: translate(-50%, -50%) scale(1.22); }
  4% { opacity: .48; transform: translate(-50%, -50%) scale(1); }
  24% { opacity: .12; transform: translate(-50%, -50%) scale(.95); }
  44%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(.9); }
}

/* ═══════════ 3-COL LAYOUT ═══════════ */
.layout {
  display: grid;
  grid-template-columns: 220px 1fr 360px;
  min-height: calc(100vh - 56px - 120px);
}

/* ─── LEFT SIDEBAR ─── */
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
  padding: 24px 0;
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-soft);
  padding: 0 20px;
  margin-bottom: 12px;
}

.radar-list {
  list-style: none;
}

.radar-item {
  display: block;
  padding: 12px 20px;
  text-decoration: none;
  color: var(--ink);
  border-left: 3px solid transparent;
  transition: all .12s;
}

.radar-item:hover {
  background: rgba(0,0,0,.03);
}

.radar-item.active {
  background: #fff;
  border-left-color: var(--accent);
  box-shadow: inset -1px 0 0 var(--line);
}

.radar-item .ri-date {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.radar-item .ri-meta {
  font-size: .78rem;
  color: var(--ink-soft);
}

.radar-item .ri-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

.sidebar-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 16px 20px;
}

.sidebar-note {
  padding: 0 20px;
  font-size: .78rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* ─── CENTER CONTENT ─── */
.content {
  padding: 28px 32px 60px;
  max-width: 100%;
  overflow-x: hidden;
}

.radar-newsletter {
  max-width: 900px;
  margin: 0 auto;
}

.radar-issue-top {
  padding: 2px 0 8px;
}

.radar-issue-top h1 {
  font-size: 2.1rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.radar-issue-top .lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 8px;
  max-width: 70ch;
}

.radar-issue-top .meta {
  font-size: .9rem;
  color: var(--ink-soft);
}

.part {
  margin: 44px 0 8px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--accent-soft-solid);
  border-left: 8px solid var(--accent);
}

.part.prawo {
  background: var(--prawo-soft);
  border-left-color: var(--prawo);
}

.part.tech {
  background: var(--tech-soft);
  border-left-color: var(--tech);
}

.part.rynek {
  background: var(--rynek-soft);
  border-left-color: var(--rynek);
}

.part h2 {
  margin: 0;
  font-size: 1.45rem;
}

.part p {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: .98rem;
}

h3.sec {
  margin: 34px 0 14px;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 18px;
  margin: 0 0 18px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
  position: relative;
}

.radar-newsletter .card::before { display: none; }

.card.prawo-card {
  border-color: #f5c6c6;
  background: var(--prawo-soft);
}

.card.tech-card {
  border-color: #c3d9ee;
  background: var(--tech-soft);
}

.card.is-selected {
  border-color: rgba(240,140,0,.45);
  box-shadow: 0 0 0 3px rgba(240,140,0,.08), var(--shadow-card);
}

.card::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 4px;
  border-radius: 0 2px 2px 0;
}

.card[data-cat="prawo"]::before { background: var(--prawo); }
.card[data-cat="rynek"]::before { background: var(--rynek); }
.card[data-cat="praktyka"]::before { background: var(--praktyka); }
.card[data-cat="tech"]::before { background: var(--tech); }

.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--accent-soft-solid);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.tag.prawo { background: var(--prawo-soft); color: var(--prawo); }
.tag.rynek { background: var(--rynek-soft); color: var(--rynek); }
.tag.tech { background: var(--tech-soft); color: var(--tech); }

.card[data-cat="prawo"] .tag { color: var(--prawo); background: rgba(192,57,43,.06); }
.card[data-cat="rynek"] .tag { color: var(--rynek); background: rgba(39,174,96,.06); }
.card[data-cat="praktyka"] .tag { color: var(--praktyka); background: var(--accent-soft); }
.card[data-cat="tech"] .tag { color: var(--tech); background: rgba(43,108,176,.06); }

.card-select {
  position: absolute;
  top: 18px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font-size: .76rem;
  cursor: pointer;
  user-select: none;
}

.card-select input {
  width: 14px;
  height: 14px;
  accent-color: var(--accent);
}

.card.is-picked {
  border-color: rgba(240,140,0,.7);
  box-shadow: 0 0 0 3px rgba(240,140,0,.10), var(--shadow-card);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}

.card h4 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  line-height: 1.35;
}

.card-summary {
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink);
  margin-bottom: 12px;
}

.card p.hook { margin: 0 0 16px; }

.facts {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.facts li {
  font-size: .85rem;
  color: var(--ink-soft);
  background: #f2f4f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 11px;
}

.facts li strong { color: var(--ink); font-weight: 600; }
.facts li b { color: var(--ink); font-weight: 600; }

details {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

summary {
  cursor: pointer;
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 11px 22px;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
summary:hover { background: var(--accent-hover); }
.prawo-card summary { background: var(--prawo); }
.prawo-card summary:hover { background: #a82323; }
.tech-card summary { background: var(--tech); }
.tech-card summary:hover { background: #22578e; }
details[open] summary { margin-bottom: 16px; }
details h5 {
  margin: 20px 0 6px;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-soft);
}
details h5:first-of-type { margin-top: 0; }
details p { margin: 0 0 6px; }
details ul { margin: 0 0 6px; padding-left: 22px; }
details a { color: var(--accent); word-break: break-word; }
.prawo-card details a { color: var(--prawo); }
.tech-card details a { color: var(--tech); }
code { background: #eef1f4; border-radius: 5px; padding: 1px 6px; font-size: .9em; }

.summary-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 8px 0 0;
}

.summary-box ul { margin: 0; padding-left: 22px; }
.summary-box li { margin-bottom: 10px; }

/* Card buttons bar */
.card-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.card-tools .card-select {
  position: static;
  flex-shrink: 0;
  background: #fff;
  border-color: rgba(240,140,0,.28);
  color: var(--ink);
  font-weight: 500;
}

.card-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 0;
  border-top: 0;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .86rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
}

.btn:active { transform: scale(.97); }

.btn-more {
  background: var(--hero-bg);
  color: #fff;
  border: 1px solid var(--hero-bg);
}
.btn-more:hover { background: var(--black); border-color: var(--black); }

.btn-post,
.btn-mail,
.btn-art,
.btn-blog,
.btn-knowledge {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn-post:hover,
.btn-mail:hover,
.btn-art:hover,
.btn-blog:hover,
.btn-knowledge:hover {
  background: var(--black);
  border-color: var(--black);
  color: #fff;
}

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ─── EXPANDED CARD DETAILS ─── */
.card-details {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
}

.card-details h5 {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}

.card-details h5:first-child { margin-top: 0; }

.card-details p {
  font-size: .88rem; line-height: 1.6; margin-bottom: 6px;
}

.card-details ul {
  margin: 0 0 6px; padding-left: 18px;
  font-size: .88rem; line-height: 1.6;
}

.card-details li { margin-bottom: 4px; }

.src-note {
  font-size: .79rem;
  color: var(--ink-muted);
  font-style: italic;
  margin: 12px 0 6px;
  padding: 10px 14px;
  background: #f9fafb;
  border-radius: 6px;
}

.src-link {
  display: block;
  font-size: .8rem;
  color: var(--accent);
  text-decoration: none;
  padding: 2px 0;
}
.src-link:hover { text-decoration: underline; }

/* ═══════════ RIGHT PANEL ═══════════ */
.panel {
  background: #fff;
  border-left: 1px solid var(--line);
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.panel-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.panel-tab {
  border: 1px solid rgba(240,140,0,.42);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  padding: 8px 10px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
}

.panel-tab:hover {
  background: var(--black);
  border-color: var(--black);
}

.panel-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--black);
}

.panel-view {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
}

/* Suggestions section */
.suggest {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.suggest-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.suggest-sub {
  font-size: .8rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
  line-height: 1.45;
}

.suggest-card {
  background: var(--sidebar-bg);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all .12s;
}

.suggest-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.suggest-card.active {
  border-color: rgba(240,140,0,.55);
  background: var(--accent-soft);
}

.suggest-card:last-child { margin-bottom: 0; }

.suggest-card .sc-title {
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.suggest-card .sc-meta {
  font-size: .76rem;
  color: var(--ink-soft);
}

.bulk {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.bulk-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.bulk-sub {
  font-size: .8rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.bulk-summary {
  background: var(--sidebar-bg);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.bulk-count {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.bulk-list {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: .78rem;
  line-height: 1.45;
}

.bulk-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.bulk-action {
  width: 100%;
  text-align: left;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  padding: 12px 14px;
  cursor: pointer;
  transition: all .12s;
}

.bulk-action:hover {
  border-color: var(--black);
  background: var(--black);
}

.bulk-action strong {
  display: block;
  font-size: .86rem;
  color: #fff;
  margin-bottom: 3px;
}

.bulk-action span {
  display: block;
  font-size: .76rem;
  color: rgba(255,255,255,.76);
  line-height: 1.45;
}

.bulk-output {
  border: 1px solid rgba(240,140,0,.22);
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .8rem;
  color: var(--ink);
  line-height: 1.5;
}

.bulk-output strong {
  display: block;
  margin-bottom: 4px;
}

.mode-options,
.format-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mode-option,
.format-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  cursor: pointer;
}

.mode-option input,
.format-option input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.mode-option strong,
.format-option strong {
  display: block;
  font-size: .84rem;
  line-height: 1.3;
}

.mode-option span,
.format-option span {
  display: block;
  color: var(--ink-soft);
  font-size: .76rem;
  line-height: 1.4;
  margin-top: 2px;
}

.create-package {
  width: 100%;
  justify-content: center;
  padding: 12px 16px;
  font-size: .9rem;
}

.create-package:disabled {
  opacity: .45;
  cursor: not-allowed;
}

/* ═══════════ STUDIO PUBLIKACJI ═══════════ */
.studio-page {
  min-height: calc(100vh - 56px);
  background: var(--bg);
}

.studio-top {
  background: var(--hero-bg);
  color: #fff;
  padding: 28px 32px;
}

.studio-top-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.studio-kicker {
  color: var(--accent);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  margin-bottom: 6px;
}

.studio-top h1 {
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 8px;
}

.studio-sub {
  color: rgba(255,255,255,.72);
  max-width: 780px;
  font-size: .96rem;
}

.btn-back {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}

.btn-back:hover { background: var(--accent); border-color: var(--accent); }

.studio-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 32px 70px;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 24px;
}

.studio-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.studio-panel h2 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.studio-note {
  color: var(--ink-soft);
  font-size: .84rem;
  margin-bottom: 14px;
}

.studio-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.studio-pill {
  background: var(--accent-soft-solid);
  color: var(--accent);
  border: 1px solid rgba(240,140,0,.22);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .76rem;
  font-weight: 600;
}

.image-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.image-option {
  border: 2px solid transparent;
  border-radius: 12px;
  background: #fff;
  padding: 7px;
  cursor: pointer;
  text-align: left;
}

.image-option.is-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240,140,0,.10);
}

.image-thumb {
  aspect-ratio: 1.25 / 1;
  border-radius: 9px;
  margin-bottom: 7px;
  border: 1px solid rgba(0,0,0,.06);
}

.image-thumb.one {
  background:
    linear-gradient(135deg, rgba(17,17,17,.15), rgba(240,140,0,.20)),
    linear-gradient(20deg, #353535 0 32%, #f08c00 32% 36%, #f7ede0 36% 100%);
}

.image-thumb.two {
  background:
    radial-gradient(circle at 72% 26%, rgba(240,140,0,.75) 0 9%, transparent 10%),
    linear-gradient(145deg, #f8efe3 0 55%, #303030 55% 100%);
}

.image-thumb.three {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.24) 0 10px, transparent 10px 22px),
    linear-gradient(135deg, #202020, #f08c00);
}

.image-thumb.four {
  background:
    radial-gradient(circle at 28% 28%, rgba(255,255,255,.72), transparent 24%),
    linear-gradient(135deg, #2d3436 0 45%, #f08c00 45% 100%);
}

.image-option strong {
  display: block;
  font-size: .78rem;
}

.image-option span {
  display: block;
  color: var(--ink-soft);
  font-size: .72rem;
}

.studio-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.studio-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.material-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.material-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-light);
}

.material-type {
  color: var(--accent);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  margin-bottom: 4px;
}

.material-head h3 {
  font-size: 1.05rem;
  line-height: 1.35;
}

.material-status {
  background: var(--accent-soft-solid);
  color: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

.material-body {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 18px 18px;
}

.material-image {
  min-height: 126px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.material-text {
  color: var(--ink);
  font-size: .9rem;
  line-height: 1.65;
  white-space: pre-wrap;
}

.material-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* Generated content section */
.gen {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gen-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line-light);
}

.gen-type {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--accent);
  margin-bottom: 2px;
}

.gen-source {
  font-size: .82rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

.gen-body {
  flex: 1;
  padding: 18px 20px;
  overflow-y: auto;
}

.gen-text {
  font-size: .88rem;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
}

.gen-text.is-details { white-space: normal; }

.gen-text h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}

.gen-text h4:first-child { margin-top: 0; }

.gen-text p { margin-bottom: 10px; }

.gen-text ul {
  margin: 0 0 10px 18px;
  padding: 0;
}

.gen-text li { margin-bottom: 4px; }

.panel-src-note {
  margin-top: 14px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  font-size: .8rem;
}

.panel-src-link {
  display: block;
  color: var(--accent);
  text-decoration: none;
  font-size: .82rem;
  margin-top: 5px;
}

.panel-src-link:hover { text-decoration: underline; }

.gen-text .cursor {
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.gen-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gen-footer.is-hidden { display: none; }

.btn-copy {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .84rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-copy:hover { background: var(--black); }

.btn-regen {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .84rem;
  font-weight: 500;
  border: 1px solid var(--accent);
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-regen:hover { background: var(--black); border-color: var(--black); }

.btn-generate {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: .84rem;
  font-weight: 500;
  border: 1px solid var(--accent);
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-generate:hover { background: var(--black); border-color: var(--black); }

.is-hidden { display: none !important; }
.main-screen.is-hidden { display: none !important; }

.gen-disc {
  margin-left: auto;
  font-size: .72rem;
  color: var(--ink-muted);
}

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 1200px) {
  .layout { grid-template-columns: 200px 1fr 320px; }
  .hero-inner { margin-left: 212px; }
}

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .panel { display: none; }
  .hero-inner { margin-left: 0; }
  .hero-radar { right: -126px; opacity: .26; }
  .content { padding: 24px 20px 60px; }
  .studio-top-inner,
  .studio-wrap {
    display: block;
  }

  .studio-wrap {
    padding: 22px 18px 60px;
  }

  .studio-panel {
    margin-bottom: 18px;
  }

  .material-body {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-radar-sweep,
  .hero-radar-blip {
    animation: none;
  }

  .hero-radar-sweep {
    transform: rotate(28deg);
    opacity: .7;
  }

  .hero-radar-blip {
    opacity: .38;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* ═══════════ DODATKI APLIKACJI (poza mockupem V5) ═══════════
   Stany, których mockup nie pokazywał: ładowanie, błąd, licznik zużycia.
   Korzystają z tych samych zmiennych i rytmu co reszta arkusza. */

.app-loading {
  color: var(--ink-soft);
  font-size: .95rem;
  padding: 24px 0;
}

.app-error {
  background: var(--prawo-soft);
  border: 1px solid #f5c6c6;
  border-radius: 14px;
  padding: 20px 22px;
  color: var(--ink);
}

.app-error strong { display: block; margin-bottom: 8px; font-size: 1.05rem; }
.app-error p { font-size: .9rem; color: var(--ink-soft); margin-bottom: 6px; }

.usage-meter {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .78rem;
  color: rgba(255,255,255,.72);
  white-space: nowrap;
}

/* Stany kart materiałów w Studiu (mockup pokazywał tylko stan gotowy). */
.material-status.is-working { background: #f2f4f7; color: var(--ink-soft); }
.material-status.is-error { background: var(--prawo-soft); color: var(--prawo); }
.material-status.is-approved { background: var(--rynek-soft); color: var(--rynek); }

.material-note {
  margin-top: 10px;
  font-size: .82rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.material-note.is-error { color: var(--prawo); }

.material-actions .btn:disabled { opacity: .45; cursor: not-allowed; }

/* Link wylogowania w nagłówku — ten sam rytm co pozostałe elementy nav-right. */
.nav-logout {
  color: rgba(255,255,255,.55);
  text-decoration: none;
  font-size: .82rem;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,.12);
  transition: all .15s;
  white-space: nowrap;
}

.nav-logout:hover {
  color: #fff;
  background: rgba(240,140,0,.18);
  border-color: rgba(240,140,0,.42);
}
