/* Rislix 08e: Knowledge Centre page. Loaded after styles.css and pages.css. Classes are prefixed kc-. */

/* ---------- R-Trax dropdown in the header (until the shared shell is stamped) ---------- */
.nav .nav-dd { position: relative; }
.nav #nav-list > li > a { white-space: nowrap; }
@media (min-width: 1121px) { .nav #nav-list { gap: clamp(12px, 1.4vw, 22px); } .nav #nav-list > li > a:not(.btn) { font-size: .9375rem; } }
.nav .nav-dd > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 2px 0 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.nav .nav-sub {
  position: absolute; top: calc(100% + 12px); left: -14px; min-width: 210px;
  flex-direction: column; align-items: stretch; gap: 0; padding: 8px; border-radius: 12px;
  background: var(--night); color: var(--ink-l);
  box-shadow: 0 0 0 1px var(--line-l), 0 24px 48px -24px rgba(0, 0, 0, .6);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity .2s, transform .25s var(--ease-out), visibility 0s .25s;
}
.nav .nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav .nav-dd:hover > .nav-sub, .nav .nav-dd:focus-within > .nav-sub { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s var(--ease-out); }
.nav .nav-sub a:not(.btn) { display: block; padding: 9px 12px; border-radius: 8px; background: none; white-space: nowrap; }
.nav .nav-sub a:not(.btn):hover { background: rgba(255, 255, 255, .08); }
.site-head[data-tone="day"] .nav .nav-sub { background: var(--day); color: var(--ink-d); box-shadow: 0 0 0 1px var(--line-d), 0 24px 48px -24px rgba(16, 32, 48, .45); }
.site-head[data-tone="day"] .nav .nav-sub a:not(.btn):hover { background: rgba(16, 32, 48, .06); }
@media (max-width: 1120px) {
  .nav #nav-list { max-height: calc(100vh - var(--head-h)); overflow-y: auto; }
  .nav .nav-dd > a::after { display: none; }
  .nav .nav-sub, .site-head[data-tone="day"] .nav .nav-sub {
    position: static; min-width: 0; padding: 0 0 0 16px; border-radius: 0;
    background: none; color: inherit; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .nav .nav-sub::before { content: none; }
  .nav .nav-sub a:not(.btn) { padding: 12px 0; border-radius: 0; font-size: 1rem; border-bottom: 1px solid var(--line-l); }
  .nav .nav-sub a:not(.btn):hover { background: none; }
}
/* ---------- filters ---------- */
.kc-sec { background: var(--day); }
.kc-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); }
.kc-filters[hidden] { display: none; }
.kc-f {
  min-height: 44px; padding: 9px 18px; border-radius: 999px; border: 1px solid #74818E; background: #fff; color: var(--ink-d);
  font: inherit; font-size: .9375rem; font-weight: 500; cursor: pointer;
  transition: background-color .25s var(--ease-out), color .25s, border-color .25s;
}
.kc-f:hover { border-color: var(--ink-d); background: #F3F6F1; }
.kc-f[aria-pressed="true"] { background: var(--ink-d); border-color: var(--ink-d); color: var(--day); }

/* ---------- cards ---------- */
.kc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.kc-card {
  display: flex; flex-direction: column; padding: clamp(22px, 2.4vw, 30px); border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 32, 48, .08), 0 40px 80px -48px rgba(16, 32, 48, .4);
}
.kc-card[hidden] { display: none; }
.kc-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .8125rem; color: var(--ink-d-soft); }
.kc-type { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #E1EAF3; color: #24496E; }
.kc-card[data-type="guide"] .kc-type { background: #DDF1EA; color: var(--verd-d); }
.kc-card[data-type="news"] .kc-type { background: #FCF0D6; color: var(--lantern-d); }
.kc-card h3 { margin-top: 18px; font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 1.4vw, 1.3rem); line-height: 1.22; letter-spacing: -.01em; }
.kc-card h3 + p { margin-top: 10px; color: var(--ink-d-soft); font-size: .9375rem; }
.js .kc-grid.is-swapping .kc-card:not([hidden]) { animation: kcIn .5s var(--ease-out) both; }
@keyframes kcIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- newsletter (night) ---------- */
.kc-news-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.kc-eyebrow { font-size: .9375rem; font-weight: 600; color: var(--lantern); margin-bottom: 12px; }
.kc-news .copy > p.kc-eyebrow { margin-top: 0; color: var(--lantern); }
.kc-row { display: flex; gap: 10px; }
.kc-row input {
  flex: 1; min-width: 0; min-height: 56px; padding: 12px 22px; border-radius: 999px;
  font: inherit; font-size: 1rem; color: var(--ink-l); background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(234, 240, 244, .4); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.kc-row input::placeholder { color: var(--ink-l-soft); opacity: .8; }
.kc-row input:hover { border-color: var(--ink-l-soft); }
.kc-row input:focus { outline: none; border-color: var(--lantern); background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 3px rgba(242, 181, 68, .25); }
.kc-row input[aria-invalid="true"] { border: 2px solid #F0928A; }
.kc-row .btn { flex: none; }
.kc-row .btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.kc-msg { margin-top: 12px; font-size: .9375rem; font-weight: 600; }
.kc-msg[hidden] { display: none; }
.kc-msg.is-ok { color: #8FD8C1; }
.kc-msg.is-err { color: #F0928A; }
.kc-privacy { margin-top: 14px; font-size: .875rem; color: var(--ink-l-soft); }

@media (max-width: 1000px) {
  .kc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kc-news-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kc-grid { grid-template-columns: minmax(0, 1fr); }
  .kc-row { flex-direction: column; }
  .kc-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .js .kc-grid.is-swapping .kc-card:not([hidden]) { animation: none; }
}
