:root {
  --ipr-gray: #c6c6c6;
  --soft-gray: #f3f3f3;
  --ink: #000;
  --muted: rgba(0, 0, 0, 0.64);
  --panel: #fff;
  --radius-lg: 0;
  --radius-md: 0;
}

* { box-sizing: border-box; }
body { font-family: FFUnitPro, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial; margin: 0; background: #fff; color: var(--ink); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--ink); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; height: 48px; }
.logo img { height: 100%; width: auto; }
nav { margin-left: auto; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.navlink { text-transform: uppercase; letter-spacing: .08em; font-weight: 900; font-size: 12px; color: var(--ink); text-decoration: none; padding: 0 0 4px; border-bottom: 2px solid transparent; }
.navlink:hover, .navlink[aria-current="page"] { border-bottom-color: var(--ink); }
.navlink.primary { background: var(--ink); color: #fff; text-decoration: none; padding: 11px 14px; border-bottom: 0; }
.navlink.primary:hover { opacity: .86; }
main { padding: 42px 0 64px; }

.hero,
.hero-panel { border: 1px solid var(--ink); background: var(--panel); overflow: hidden; }
.hero { padding: 34px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0; border-bottom: 1px solid var(--ink); background: #fff; }
.hero-copy { min-height: 390px; padding: 34px; position: relative; overflow: hidden; }
.hero-copy::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.9) 38%, rgba(255,255,255,.28) 100%); z-index: 1; pointer-events: none; }
.hero-copy::after { content: ""; position: absolute; inset: -95px -120px -115px auto; width: min(740px, 72vw); background: url("https://iprpraha.cz/dist/images/map_road.svg") center / contain no-repeat; opacity: .58; pointer-events: none; }
.hero-copy > * { position: relative; z-index: 2; }
.eyebrow { display: inline-flex; margin-bottom: 18px; padding: 0; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 900; color: var(--ink); }
h1 { font-family: FFUnitSlabPro, Georgia, serif; font-size: clamp(46px, 8vw, 92px); line-height: .86; margin: 0 0 20px; letter-spacing: -.055em; max-width: 780px; }
h2 { font-size: 21px; margin: 0 0 4px; line-height: 1.1; }
h3 { margin: 0 0 6px; }
p { margin: 0 0 10px; line-height: 1.55; }
ul { margin: 0; padding-left: 18px; }
.sub { color: var(--ink); font-size: 18px; max-width: 680px; margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 0; }
.chip { border: 1px solid var(--ink); margin: 0 -1px -1px 0; padding: 9px 12px; font-size: 12px; font-weight: 900; background: #fff; text-transform: uppercase; letter-spacing: .06em; }
.status-card { border-left: 1px solid var(--ink); padding: 28px; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 12px; justify-content: flex-end; }
.status-card .meta { color: rgba(255,255,255,.72); }
.status-label { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 900; color: rgba(255,255,255,.72); }
.quota { font-size: 25px; line-height: 1.05; font-weight: 950; }
.meta { font-size: 12px; color: var(--muted); }

.chat-shell { padding: 34px 34px 0; }
.section-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.section-head p { color: var(--muted); font-size: 14px; margin: 0; max-width: 620px; }
.empty-state { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 18px; align-items: start; border: 1px solid var(--ink); padding: 22px; background: #fff; color: var(--muted); }
.empty-state.hidden { display: none; }
.empty-mark { width: 58px; height: 58px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 950; font-size: 34px; font-family: FFUnitSlabPro, Georgia, serif; }
.empty-state h3 { color: var(--ink); font-size: 21px; }
.empty-state p { margin: 0; font-size: 14px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.suggestion { padding: 9px 11px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font-size: 12px; font-weight: 900; text-align: left; text-transform: none; }
.suggestion:hover:not(:disabled) { background: var(--ink); color: #fff; }
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 88%; border: 1px solid var(--ink); padding: 16px; box-shadow: none; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); }
.msg.assistant { align-self: flex-start; background: #fff; }
.msg-role { font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 7px; opacity: .7; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; line-height: 1.55; }
.msg-sources { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ink); }
.feedback { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ink); }
.feedback-label { flex-basis: 100%; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.feedback button { padding: 7px 10px; background: #fff; color: var(--ink); border: 1px solid var(--ink); font-size: 12px; }
.feedback button.selected { background: var(--ink); color: #fff; border-color: var(--ink); }
.feedback button.feedback-submit { background: var(--ink); color: #fff; border-color: var(--ink); }
.feedback button.feedback-submit:disabled { background: #fff; color: var(--muted); border-color: var(--ipr-gray); }
.feedback-note { flex: 1 1 180px; min-width: 160px; border: 1px solid var(--ink); padding: 8px 11px; font: inherit; font-size: 12px; outline: none; }
.feedback-status { font-size: 12px; color: var(--muted); }
.msg.user a { color: #fff; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { opacity: .75; }

.preview-drawer { display: none; margin-top: 16px; border: 1px solid var(--ink); overflow: hidden; background: #fff; }
.preview-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--ink); }
.preview-title { font-weight: 900; color: var(--ink); }
.preview-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.preview-frame { width: 100%; height: min(70vh, 720px); border: 0; display: block; background: var(--soft-gray); }
.link-button { border: 0; background: transparent; color: var(--ink); padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }

.composer-card { position: sticky; bottom: 0; margin-top: 28px; padding: 18px 34px 24px; border-top: 1px solid var(--ink); background: #fff; }
.composer-label { display: block; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 900; color: var(--muted); }
textarea { width: 100%; min-height: 82px; max-height: 220px; resize: none; padding: 14px 16px; border: 1px solid var(--ink); background: #fff; color: var(--ink); font: inherit; font-size: 17px; font-weight: 650; line-height: 1.45; outline: none; transition: background .15s ease; }
textarea:focus { background: var(--soft-gray); }
.composer-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
.composer-hint { margin-right: auto; font-size: 12px; color: var(--muted); }
.composer-foot { margin-top: 8px; font-size: 12px; color: var(--muted); }
button { padding: 12px 18px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 900; letter-spacing: .04em; cursor: pointer; transition: opacity .12s ease, background .12s ease, color .12s ease; text-transform: uppercase; }
button:hover:not(:disabled) { background: #fff; color: var(--ink); }
button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
button.secondary:hover:not(:disabled) { background: var(--ink); color: #fff; }
button:disabled { opacity: 0.52; cursor: not-allowed; transform: none; }
.status { display: none; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--ink); background: #fff; margin-top: 10px; }
.orb { width: 10px; height: 10px; border-radius: 999px; background: var(--ink); box-shadow: 0 0 0 6px rgba(0,0,0,0.06); }
.thinking .orb { animation: pulse 900ms ease-in-out infinite; }
.dots::after { content: ""; display: inline-block; width: 2ch; text-align: left; animation: dots 1200ms steps(4,end) infinite; }

@keyframes pulse { 0% { transform: scale(1); opacity: .7; } 50% { transform: scale(1.55); opacity: 1; } 100% { transform: scale(1); opacity: .7; } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } 100% { content: ""; } }

.login-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 460px); border: 1px solid var(--ink); background: #fff; padding: 34px; box-shadow: none; }
.login-logo { height: 52px; width: auto; margin-bottom: 22px; }
.login-form { display: grid; gap: 10px; margin-top: 18px; }
.login-form input { width: 100%; border: 1px solid var(--ink); padding: 13px 14px; font: inherit; font-size: 16px; outline: none; }
.login-form input:focus { background: var(--soft-gray); }
.login-error { min-height: 18px; color: #8a0000; font-size: 13px; font-weight: 700; }
.instructions { display: grid; gap: 18px; }
.notice-card { border: 1px solid var(--ink); padding: 16px; background: #fff; line-height: 1.55; }
.secondary-notice { border-color: var(--ipr-gray); background: var(--soft-gray); }
.instruction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.instruction-card { border: 1px solid var(--ink); padding: 18px; background: #fff; }
.instruction-card h2 { margin-bottom: 10px; }
.instruction-card li { margin-bottom: 7px; line-height: 1.45; }

@media (max-width: 760px) {
  .container { padding: 0 10px; }
  .header-inner { align-items: flex-start; flex-direction: column; padding: 10px 0; gap: 8px; }
  nav { margin-left: 0; justify-content: flex-start; }
  .navlink { font-size: 10px; padding: 7px 8px; }
  main { padding: 12px 0 34px; }
  .hero-panel { border-radius: 20px; }
  .hero-grid { grid-template-columns: 1fr; padding: 18px; }
  .hero-copy { min-height: 430px; }
  .hero-copy::before { background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,.9) 48%, rgba(255,255,255,.32) 100%); }
  .hero-copy::after { inset: auto -90px -115px -50px; width: 540px; height: 390px; opacity: .52; }
  .chat-shell { padding: 18px 14px 0; }
  .msg { max-width: 100%; }
  .composer-card { padding: 14px; }
  .composer-actions { justify-content: stretch; }
  .composer-actions button { flex: 1 1 140px; }
  .composer-hint { flex-basis: 100%; }
  .instruction-grid { grid-template-columns: 1fr; }
}
