/* CIO Group's look over the template's base.css and styles.css, from CIO's design system (repo cio-group,
   podklady/design-system: tokens/*.css, fonts, assets/logo.svg, readme.md). The brand is print-born and flat: DM Sans
   only, white with powdery blush and cream, near-black ink, taupe secondary text, no glass, gradients, radii, shadows
   or icons. Headings are Regular, never bold; small labels on white stay at #6f645e or darker. */

@font-face {
  font-family: "DM Sans";
  src: url("DMSans-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("DMSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("DMSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("DMSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

/* :root[data-wp] outranks the template's wallpaper variants, which stay unreachable (the "Vzhled" button is hidden). */
:root,
:root[data-wp] {
  --cio-white: #ffffff;
  --cio-paper: #f3f0eb;
  --cio-cream: #efebe7;
  --cio-blush-300: #dec9bd;
  --cio-blush-400: #d6c2b4;
  --cio-blush-600: #c6b3a4;
  --cio-taupe-500: #8c7f78;
  --cio-taupe-600: #7e7771;
  --cio-label: #6f645e;
  --cio-ink: #1d1d1b;
  --cio-navy: #2d3646;
  --cio-hairline: #d9d4cf;
  --cio-ease: cubic-bezier(0.4, 0, 0.2, 1);

  --fg: var(--cio-ink);
  --fg2: var(--cio-label);
  --fg3: var(--cio-label);
  --tintc: var(--cio-white);
  --line: var(--cio-hairline);
  --hi: transparent;
  --lo: transparent;
  --shadow: none;
  --ok: #4b6b55;
  --warn: #8a5a14;
  --crit: #a1382f;
  --idle: var(--cio-taupe-500);
  --gold: var(--cio-label);
  --blue: var(--cio-navy);
  --r-l: 0;
  --r-m: 0;
  --r-s: 0;
  --ui: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --disp: var(--ui);
  color-scheme: light;
}

body {
  background: var(--cio-white);
  color: var(--cio-ink);
  font-size: 15px;
}
.wp,
.look-btn,
.look-pop {
  display: none !important;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--cio-navy);
  border-radius: 0;
}

/* No glass: flat surfaces; grouping by tone, not by frames. */
.glass {
  background: var(--cio-white);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* ---------- navigation ---------- */
.page {
  max-width: 1320px;
  padding: 0 24px 64px;
}
.nav {
  top: 0;
  margin: 0 -24px;
  padding: 14px 24px;
  gap: 4px;
  border-bottom: 1px solid var(--cio-hairline);
}
/* The logo replaces the template's name; never redrawn, the file is CIO's own. */
.nav .brand {
  flex: none;
  width: 98px;
  height: 25px;
  padding: 0;
  margin-right: auto;
  font-size: 0;
  background: url("logo.svg") left center / contain no-repeat;
}
.nav .tab {
  padding: 8px 12px;
  border-radius: 0;
  color: var(--cio-label);
  font-size: 15px;
  border-bottom: 2px solid transparent;
  transition: color 240ms var(--cio-ease);
}
.nav .tab:hover {
  background: none;
  color: var(--cio-ink);
}
.nav .tab[aria-current="page"] {
  background: none;
  box-shadow: none;
  color: var(--cio-ink);
  border-bottom-color: var(--cio-ink);
}
.nav .logout {
  margin-left: 12px;
  color: var(--cio-label);
  font-size: 13px;
}
.nav .logout:hover {
  color: var(--cio-ink);
}

/* ---------- page heading ---------- */
.heading {
  margin: 40px 0 28px;
  align-items: flex-end;
}
.eyebrow {
  font: 600 11px var(--ui);
  letter-spacing: 0.14em;
  color: var(--cio-label);
  margin-bottom: 10px;
}
h1 {
  font: 400 clamp(30px, 3.4vw, 44px) / 1.15 var(--ui);
  letter-spacing: 0.01em;
}
.heading p {
  color: var(--cio-label);
  max-width: 68ch;
}

/* ---------- buttons and inputs ---------- */
:root[data-wp] .btn {
  border-radius: 0;
  background: none;
  border: 1px solid var(--cio-ink);
  color: var(--cio-ink);
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 400;
  transition:
    color 240ms var(--cio-ease),
    border-color 240ms var(--cio-ease);
}
:root[data-wp] .btn:hover {
  background: none;
  color: var(--cio-taupe-600);
  border-color: var(--cio-taupe-600);
}
:root[data-wp] .btn.pri {
  background: var(--cio-ink);
  color: var(--cio-white);
}
:root[data-wp] .btn.pri:hover {
  background: var(--cio-taupe-600);
  color: var(--cio-white);
}
:root[data-wp] input,
:root[data-wp] textarea,
:root[data-wp] select {
  background: var(--cio-white);
  color: var(--cio-ink);
  border: 1px solid var(--cio-blush-600);
  border-radius: 0;
}
:root[data-wp] input:focus,
:root[data-wp] textarea:focus {
  outline: 1px solid var(--cio-ink);
  border-color: var(--cio-ink);
}

/* ---------- cards: cream panels ---------- */
.bento {
  gap: 16px;
}
.tl.card {
  background: var(--cio-cream);
  padding: 22px 24px 16px;
  min-height: 0;
}
.tl h2,
.card h2 {
  font: 400 18px / 1.3 var(--ui);
  color: var(--cio-ink);
  letter-spacing: 0.01em;
  margin: 0;
}
.card header {
  margin-bottom: 10px;
}
.tag {
  font: 500 11px var(--ui);
  border-radius: 0;
  border-color: var(--cio-taupe-500);
  color: var(--cio-label);
}
.items {
  margin: 0 0 8px;
}
.items li {
  padding: 11px 0;
  border-bottom: 1px solid var(--cio-hairline);
  line-height: 1.4;
}
.items li:last-child {
  border-bottom: 0;
}
.items a {
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 240ms var(--cio-ease);
}
.items a:hover,
.items a:focus-visible {
  color: var(--cio-taupe-600);
  text-decoration: underline;
}
.item-text small {
  font-size: 13px;
  color: var(--cio-label);
  margin-top: 3px;
}
.items li.note {
  color: var(--cio-label);
}
.description {
  font-size: 13px;
  color: var(--cio-label);
}
.card footer {
  border-top: 1px solid var(--cio-hairline);
  color: var(--cio-label);
}
.error-text {
  color: var(--crit);
}
.muted {
  color: var(--cio-label);
}

/* ---------- Anežka's chat: paper panel on the brand's vertical rule ---------- */
.assistant {
  background: var(--cio-paper);
  border-left: 2px solid var(--cio-blush-400);
  padding: 22px 24px;
}
.assistant-head h2 {
  font: 400 18px / 1.3 var(--ui);
  letter-spacing: 0.01em;
}
.assistant-head span {
  display: none;
}
.chat-entry {
  background: var(--cio-white);
  border-radius: 0;
  padding: 14px 16px;
}
.chat-entry .question {
  font-weight: 500;
}
.prose {
  line-height: 1.6;
}

/* ---------- dialog, toast, login ---------- */
dialog {
  border: 1px solid var(--cio-hairline);
}
dialog::backdrop {
  background: rgba(29, 29, 27, 0.35);
  backdrop-filter: none;
}
dialog pre {
  background: var(--cio-cream);
  border-radius: 0;
}
#toast {
  background: var(--cio-ink);
  border-radius: 0;
}
.login {
  background: var(--cio-cream);
  padding: 36px;
}
.login h1 {
  font-size: 32px;
}

/* Desktop: the day on the left, Anežka beside it and in view while scrolling. */
@media (min-width: 1100px) {
  #view:has(> .assistant) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
    column-gap: 24px;
    align-items: start;
  }
  #view:has(> .assistant) > :not(.assistant, .bento) {
    grid-column: 1 / -1;
  }
  #view > .bento {
    grid-column: 1;
    grid-row: 3;
  }
  #view > .assistant {
    grid-column: 2;
    grid-row: 3;
    position: sticky;
    top: 78px;
    margin: 0;
  }
  #view > .assistant .input-row {
    flex-wrap: wrap;
  }
  #view > .assistant .input-row input {
    flex-basis: 100%;
  }
  #view > .assistant .chat-log {
    max-height: calc(100vh - 330px);
  }
}
@media (max-width: 760px) {
  .page {
    padding: 0 16px 48px;
  }
  .nav {
    margin: 0 -16px;
    padding: 10px 16px;
  }
  .nav .brand {
    width: 82px;
    height: 21px;
  }
  .nav .tab {
    font-size: 14px;
    padding: 8px 8px;
  }
  .heading {
    margin: 26px 0 20px;
    flex-wrap: wrap;
  }
  .heading h1 {
    font-size: 30px;
  }
  .tl.card {
    padding: 18px 16px 12px;
  }
  .assistant {
    padding: 18px 16px;
  }
}
