/* Knowledge Plaza v5: compact editorial hierarchy and scan-friendly project rows. */
.knowledge-page-inner {
  width: min(1180px, 100%);
  padding-top: 24px;
}

.knowledge-top {
  min-height: 148px;
  margin-bottom: 16px;
  padding: 26px 32px;
  border-radius: 20px;
}
.knowledge-top::before {
  right: clamp(28px, 7vw, 90px);
  width: clamp(104px, 13vw, 158px);
}
.knowledge-top::after { display: none; }
.knowledge-top h1 {
  margin: 9px 0 5px;
  font-size: clamp(32px, 4vw, 46px);
}
.knowledge-top p {
  max-width: 620px;
  font-size: 13px;
  line-height: 1.65;
}

.knowledge-daily {
  position: relative;
  overflow: visible;
  padding: 22px;
  border-radius: 18px;
}
.knowledge-daily-head { z-index: 10; }
.knowledge-daily-heading-line {
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.knowledge-daily-heading-line > span {
  color: #9399a6;
  font-size: 10px;
}
.knowledge-daily-head h2 {
  margin-top: 6px;
  font-size: clamp(20px, 2.2vw, 27px);
}
.knowledge-daily-intro {
  margin: 8px 0 14px;
  font-size: 12px;
}
.knowledge-rule-wrap { position: relative; }
.knowledge-rule-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(49, 55, 78, .1);
  border-radius: 9px;
  background: rgba(255, 255, 255, .62);
  color: #5d6472;
  font-size: 11px;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.knowledge-rule-button svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.4;
}
.knowledge-rule-button:hover,
.knowledge-rule-button[aria-expanded="true"] { border-color: rgba(105, 92, 196, .24); background: #f8f7ff; color: #5e54ae; }
.knowledge-rule-button:focus-visible,
.knowledge-rule-panel button:focus-visible { outline: 2px solid rgba(105, 92, 196, .55); outline-offset: 2px; }
.knowledge-rule-panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  width: min(390px, calc(100vw - 40px));
  padding: 16px;
  border: 1px solid rgba(64, 70, 94, .11);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 20px 60px rgba(35, 41, 67, .16), 0 2px 8px rgba(35, 41, 67, .05);
  color: #343946;
}
.knowledge-rule-panel[hidden] { display: none; }
.knowledge-rule-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.knowledge-rule-panel-head strong { font-size: 14px; }
.knowledge-rule-panel-head button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: #f5f5f8;
  color: #69707e;
  font-size: 18px;
  cursor: pointer;
}
.knowledge-rule-panel > p { margin: 8px 0 12px; color: #6f7582; font-size: 11px; line-height: 1.65; }
.knowledge-rule-source-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.knowledge-rule-source-grid span { padding: 9px 10px; border-radius: 9px; background: #f7f7fa; color: #626976; font-size: 11px; }
.knowledge-rule-source-grid b { margin-right: 4px; color: #5d53ad; font-size: 16px; }
.knowledge-rule-panel ol { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.knowledge-rule-panel li { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; font-size: 11px; line-height: 1.55; }
.knowledge-rule-panel li b { color: #5f55ad; }
.knowledge-rule-panel li span { color: #626976; }
.knowledge-rule-panel small { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eeeef2; color: #9297a2; font-size: 9px; line-height: 1.6; }
.knowledge-daily-board { gap: 8px; }
.knowledge-daily-card {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(0, 1.55fr) auto;
  align-items: start;
  gap: 18px;
  padding: 15px 16px;
  border-radius: 12px;
}
.knowledge-daily-card.featured {
  border-color: rgba(112, 101, 216, .22);
  background: linear-gradient(105deg, rgba(248, 247, 255, .98), rgba(255, 255, 255, .88));
  box-shadow: inset 3px 0 0 #7a70d1, 0 10px 26px rgba(69, 61, 137, .06);
}
.knowledge-daily-card-top { min-width: 0; }
.knowledge-daily-title {
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
}
.knowledge-daily-title a { max-width: 100%; }
.knowledge-daily-title strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.knowledge-daily-recommended {
  padding: 2px 6px;
  border-radius: 999px;
  background: #ece9ff;
  color: #6258b6;
  font-size: 9px;
  font-weight: 650;
}
.knowledge-daily-category,
.knowledge-daily-trend {
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.5;
}
.knowledge-daily-category { background: #f1f3f7; color: #656c79; }
.knowledge-daily-trend { background: #eef8f4; color: #39745f; }
.knowledge-daily-content {
  display: grid;
  min-width: 0;
  gap: 7px;
}
.knowledge-daily-row {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
}
.knowledge-daily-row b {
  color: #858b98;
  line-height: 1.65;
}
.knowledge-daily-row.special {
  margin: 0 -8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(112, 101, 216, .065), rgba(91, 135, 220, .035));
  color: #454a57;
}
.knowledge-daily-row.special b { color: #655cb2; }
.knowledge-daily-bottom {
  min-width: 126px;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 9px;
  margin: 0;
}
.knowledge-daily-stack {
  max-width: 170px;
  border-radius: 999px;
  text-align: right;
}
.knowledge-daily-open {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(39, 47, 70, .09);
  border-radius: 8px;
  background: rgba(255, 255, 255, .68);
  text-decoration: none;
}

.knowledge-search {
  position: sticky;
  z-index: 4;
  top: 10px;
  box-shadow: 0 12px 34px rgba(34, 42, 66, .08), inset 0 1px 0 #fff;
}
.knowledge-toolbar { margin-top: 20px; }
.knowledge-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.knowledge-card {
  min-height: 190px;
  padding: 16px;
  border-radius: 13px;
}

@media (max-width: 900px) {
  .knowledge-daily-card { grid-template-columns: minmax(150px, .6fr) minmax(0, 1.4fr); }
  .knowledge-daily-bottom { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (max-width: 620px) {
  .knowledge-top { min-height: auto; padding: 22px 20px; }
  .knowledge-top::before { opacity: .22; }
  .knowledge-daily { padding: 16px 12px; }
  .knowledge-daily-head { align-items: flex-start; }
  .knowledge-daily-actions { flex-wrap: wrap; justify-content: flex-end; }
  .knowledge-rule-panel { position: fixed; z-index: 100; top: 76px; right: 12px; left: 12px; width: auto; max-height: calc(100dvh - 96px); overflow: auto; }
  .knowledge-daily-card { grid-template-columns: 1fr; gap: 11px; }
  .knowledge-daily-content { padding-left: 31px; }
  .knowledge-daily-bottom { grid-column: auto; flex-direction: row; align-items: center; margin-left: 31px; }
  .knowledge-daily-row { grid-template-columns: 68px minmax(0, 1fr); }
  .knowledge-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .knowledge-rule-button { transition: none; }
}
