:root {
  --uitm: #4b145f;
  --uitm-dark: #32103d;
  --gold: #bd9633;
  --leaf: #276248;
  --teal: #256772;
  --ink: #1d261f;
  --muted: #68736c;
  --line: #e1e7e2;
  --paper: #f8f8f2;
  --soft: #eef3ef;
  --white: #fff;
  --rk-green-950: var(--uitm-dark);
  --rk-green-900: var(--uitm);
  --rk-green-800: var(--uitm);
  --rk-green-700: #6b357b;
  --rk-green-600: #7d4a8d;
  --rk-gold-600: var(--gold);
  --rk-gold-500: #d2ae4f;
  --rk-bg: var(--paper);
  --rk-surface: var(--white);
  --rk-surface-soft: #fbfbf6;
  --rk-line: var(--line);
  --rk-text: var(--ink);
  --rk-muted: var(--muted);
  --green-900: var(--uitm);
  --green-700: #6b357b;
  --green-500: #7d4a8d;
  --gold: #bd9633;
  --cream: var(--paper);
  --bg: var(--paper);
  --surface: var(--white);
  --text: var(--ink);
}

html { scroll-behavior: smooth; }
* { letter-spacing: 0 !important; }
body {
  min-height: 100vh;
  background: var(--paper) !important;
  color: var(--ink) !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 15.5px;
  line-height: 1.6;
}
a { text-underline-offset: .22em; }

.site-header {
  background: rgba(255, 255, 250, .96) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line) !important;
  border-top: 3px solid var(--uitm) !important;
  box-shadow: none !important;
}
.site-header .container { min-height: 68px; }
.brand-mark {
  width: 52px !important;
  height: 52px !important;
  border-radius: 8px !important;
  background: var(--uitm) !important;
  display: grid;
  place-items: center;
  color: #fff !important;
  font-weight: 650 !important;
  box-shadow: none !important;
}
.site-header .fw-bold,
.login-card .fw-bold,
footer .fw-bold { font-weight: 650 !important; }
.text-success { color: var(--uitm) !important; }
.site-header nav a,
.nav-link-rk {
  color: #35433b !important;
  font-size: .9rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  border-radius: 8px !important;
  padding: .35rem .25rem !important;
}
.site-header nav a:hover,
.site-header nav a:focus,
.nav-link-rk:hover { color: var(--uitm) !important; background: transparent !important; }

.hero,
.search-hero,
.page-hero,
.listing-hero,
.topbar-card,
.detail-panel {
  background: linear-gradient(90deg, rgba(75, 20, 95, .055), rgba(39, 98, 72, .035)), #fffefa !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 24px rgba(23, 33, 27, .045) !important;
}
.hero { padding: 3.7rem 0 3.15rem !important; }
.search-hero { padding: 3rem 0 !important; border-left: 0 !important; border-right: 0 !important; border-radius: 0 !important; }
.page-shell { padding: 1.5rem 0 2.5rem !important; }

.hero h1,
.page-title,
.title-main,
.section-title,
.card-soft h1,
.card-soft h2,
.card-soft h3,
.panel-box h1,
.panel-box h2,
.panel-box h3,
.summary-panel h1,
.summary-panel h2,
.summary-panel h3,
.result-title,
.material-item h3,
.ai-review-item h3,
.fw-bold,
.fw-semibold {
  color: var(--ink) !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}
.hero h1,
.page-title,
.title-main {
  font-size: clamp(2rem, 4vw, 3.65rem) !important;
  line-height: 1.08 !important;
}
.section-title { font-size: clamp(1.25rem, 2.1vw, 2rem) !important; line-height: 1.16 !important; }
.summary-panel .section-title,
.panel-box .section-title,
.detail-panel .section-title { font-size: 1rem !important; color: var(--uitm) !important; }
.hero p,
.section-copy,
.body-copy,
.summary,
.text-secondary,
.meta,
.meta-line,
.small.text-secondary { color: var(--muted) !important; }

.hero-kicker,
.section-note,
.section-label,
.chip,
.pill,
.helper-chip {
  display: inline-flex !important;
  align-items: center;
  gap: .42rem;
  border: 1px solid #eaddec !important;
  background: #f6eff8 !important;
  color: var(--uitm) !important;
  border-radius: 999px !important;
  font-weight: 650 !important;
  font-size: .82rem !important;
  padding: .42rem .7rem !important;
}

.card-soft,
.taxonomy-card,
.material-card,
.material-item,
.summary-panel,
.related-card,
.meta-card,
.filter-panel,
.search-panel,
.result-card,
.hero-visual,
.panel-box,
.mini-stat,
.metric-tile,
.empty-state,
.ai-review-panel,
.ai-review-item,
.login-card {
  background: var(--white) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 24px rgba(23, 33, 27, .045) !important;
}
.card-soft,
.summary-panel,
.panel-box,
.filter-panel,
.material-card,
.material-item,
.ai-review-panel,
.ai-review-item { padding: 1rem !important; }
.taxonomy-card,
.material-card,
.material-item,
.related-card,
.ai-review-item { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.taxonomy-card:hover,
.material-card:hover,
.material-item:hover,
.related-card:hover,
.ai-review-item:hover {
  transform: translateY(-2px) !important;
  border-color: #d5c17a !important;
  box-shadow: 0 16px 34px rgba(23, 33, 27, .07) !important;
}

.taxonomy-icon,
.material-icon,
.ai-review-icon,
.source-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 8px !important;
  background: #f6eff8 !important;
  color: var(--uitm) !important;
  border: 1px solid #eaddec !important;
  display: grid;
  place-items: center;
  font-size: 1.18rem !important;
}
.metric-value,
.display-6,
.fs-4.fw-bold { font-size: 1.55rem !important; font-weight: 700 !important; color: var(--ink) !important; }
.metric-label,
.meta-label { color: var(--muted) !important; font-weight: 650 !important; }
.meta-value { color: var(--ink) !important; font-weight: 650 !important; }

.btn-main,
.btn-primary {
  background: var(--uitm) !important;
  border-color: var(--uitm) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 650 !important;
  padding: .82rem 1.05rem !important;
  box-shadow: none !important;
}
.btn-main:hover,
.btn-main:focus,
.btn-primary:hover,
.btn-primary:focus {
  background: var(--uitm-dark) !important;
  border-color: var(--uitm-dark) !important;
  color: #fff !important;
}
.btn-accent,
.btn-warning {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #241b08 !important;
  border-radius: 8px !important;
  font-weight: 650 !important;
  padding: .82rem 1.05rem !important;
}
.btn-light,
.btn-soft,
.btn-outline-rk,
.btn-outline-secondary {
  background: #fff !important;
  border: 1px solid var(--line) !important;
  color: var(--ink) !important;
  border-radius: 8px !important;
  font-weight: 650 !important;
}
.btn-light:hover,
.btn-soft:hover,
.btn-outline-rk:hover,
.btn-outline-secondary:hover {
  border-color: var(--gold) !important;
  background: #fff9e8 !important;
  color: #2a220b !important;
}

.form-control,
.form-select {
  border: 1px solid transparent !important;
  background: #f5f7f4 !important;
  border-radius: 8px !important;
  min-height: 50px;
  font-size: .94rem;
}
.form-control:focus,
.form-select:focus {
  border-color: rgba(75, 20, 95, .18) !important;
  box-shadow: 0 0 0 .16rem rgba(75, 20, 95, .12) !important;
}
.search-wrap { border-radius: 8px !important; box-shadow: 0 16px 36px rgba(50, 16, 61, .06) !important; }

.subnav-scroll { display: flex; gap: .6rem; overflow: auto; padding-bottom: .25rem; scrollbar-color: #d5c17a transparent; }
.subnav-pill {
  border-radius: 999px !important;
  border: 1px solid var(--line) !important;
  background: #fff !important;
  color: var(--ink) !important;
  font-weight: 650 !important;
}
.subnav-pill.active,
.subnav-pill:hover {
  background: #f6eff8 !important;
  border-color: #eaddec !important;
  color: var(--uitm) !important;
}
.lang-switch { padding: .16rem !important; background: #f0f4f0 !important; border: 1px solid var(--line) !important; border-radius: 999px !important; }
.lang-switch .btn { border-radius: 999px !important; border: 0 !important; box-shadow: none !important; min-width: 42px; font-weight: 600 !important; padding: .25rem .55rem !important; }
.lang-switch .btn.active { background: var(--gold) !important; color: #241b08 !important; }

.source-badge,
.badge { font-weight: 650 !important; letter-spacing: 0 !important; }
.source-badge { border-radius: 999px !important; padding: .28rem .52rem !important; font-size: .7rem !important; }
.source-badge.hardcopy { background: #e8f3ed !important; color: var(--leaf) !important; }
.source-badge.ir { background: #e7f2f3 !important; color: #1e6570 !important; }
.source-badge.elib { background: #fff3d9 !important; color: #785600 !important; }
.source-badge.ebook { background: #f3e8f8 !important; color: var(--uitm) !important; }
.badge.bg-success-subtle,
.status-badge.bg-success-subtle { background: #e8f3ed !important; color: var(--leaf) !important; }
.alert-warning { border-color: #eedca6 !important; background: #fff8df !important; color: #6f5310 !important; }

.cover-frame { border-radius: 8px !important; background: #f5f7f4 !important; border-color: var(--line) !important; box-shadow: 0 10px 24px rgba(23, 33, 27, .08) !important; }
.cover-frame img { border-radius: 8px !important; }
.cover-frame::before,
.cover-frame::after { display: none !important; }
.related-card .thumb { border-radius: 8px !important; }


.related-list {
  display: grid;
  gap: 1rem;
}
.related-list-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.related-cover-link {
  flex: 0 0 auto;
  display: block;
  text-decoration: none;
}
.rk-cover-related {
  width: 104px;
  min-width: 104px;
  box-shadow: none;
}
.related-list-body {
  min-width: 0;
  flex: 1;
}
.related-list-title {
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.35;
}
.related-list-title a {
  color: var(--ink);
  text-decoration: none;
}
.related-list-title a:hover {
  color: var(--uitm);
}
.related-list-summary {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 575.98px) {
  .related-list-item {
    gap: .8rem;
    padding: .85rem;
  }
  .rk-cover-related {
    width: 78px;
    min-width: 78px;
  }
  .rk-cover-related .rk-cover-title {
    font-size: .64rem;
    -webkit-line-clamp: 6;
  }
  .rk-cover-related .rk-cover-brand,
  .rk-cover-related .rk-cover-foot {
    font-size: .5rem;
  }
}

footer {
  background: var(--uitm-dark) !important;
  color: #f9f7ef !important;
  border-top: 4px solid var(--gold) !important;
}
footer a { color: #fff; }
.rk-skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 2000; background: var(--uitm-dark); color: #fff; border-radius: 999px; padding: .7rem 1rem; text-decoration: none; }
.rk-skip-link:focus { top: 1rem; }

@media (max-width: 767.98px) {
  body { font-size: 15px; }
  .site-header .container { min-height: auto; }
  .brand-mark { width: 48px !important; height: 48px !important; }
  .hero { padding-top: 2.75rem !important; }
  .card-soft,
  .summary-panel,
  .panel-box,
  .filter-panel,
  .material-card,
  .material-item,
  .ai-review-panel,
  .ai-review-item { border-radius: 8px !important; }
}


.rk-cover{position:relative;display:block;aspect-ratio:2/3;width:100%;overflow:hidden;border:1px solid var(--line,#e1e7e2);border-radius:8px;background:#f5f7f4;box-shadow:0 10px 24px rgba(23,33,27,.08)}
.rk-cover img{position:absolute;inset:0;z-index:2;width:100%;height:100%;object-fit:cover;border-radius:8px;background:#f5f7f4}
.rk-cover-mockup{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:space-between;gap:.6rem;padding:12%;background:linear-gradient(145deg,#4b145f 0%,#5e2b71 42%,#276248 100%);color:#fff;overflow:hidden}
.rk-cover-mockup::after{content:"";position:absolute;inset:auto -18% 15% 28%;height:38%;background:rgba(189,150,51,.22);transform:rotate(-18deg);border-radius:999px;pointer-events:none}
.rk-cover-brand,.rk-cover-foot{position:relative;z-index:1;font-size:.72rem;font-weight:800;line-height:1;text-transform:uppercase;color:#f8e7af}
.rk-cover-foot{font-size:.62rem;letter-spacing:0;color:rgba(255,255,255,.72)}
.rk-cover-title{position:relative;z-index:1;font-weight:800;line-height:1.12;font-size:clamp(.86rem,1.3vw,1.28rem);display:-webkit-box;-webkit-line-clamp:7;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word;overflow-wrap:anywhere;hyphens:auto;text-shadow:0 2px 12px rgba(0,0,0,.22)}
.rk-cover-rule{position:relative;z-index:1;width:44%;height:3px;border-radius:999px;background:#bd9633}
.rk-cover-list{width:92px;min-width:92px;box-shadow:none}
.rk-cover-rank{width:58px;min-width:58px;box-shadow:none}
.rk-cover-rank .rk-cover-mockup{padding:10%}.rk-cover-rank .rk-cover-title{font-size:.5rem;-webkit-line-clamp:5}.rk-cover-rank .rk-cover-brand,.rk-cover-rank .rk-cover-foot{font-size:.42rem}.rk-cover-rank .rk-cover-rule{height:2px}
.result-card-with-cover{display:flex;gap:1rem;align-items:flex-start}.result-cover-link{display:block;flex:0 0 auto;text-decoration:none}.result-content{min-width:0;flex:1}
@media(max-width:575.98px){.result-card-with-cover{gap:.8rem}.rk-cover-list{width:76px;min-width:76px}.rk-cover-list .rk-cover-title{font-size:.68rem;-webkit-line-clamp:6}.rk-cover-list .rk-cover-brand,.rk-cover-list .rk-cover-foot{font-size:.5rem}}
