/* BlueprintLab Tools 1.14.0 — role-aware brand system
   Keeps the v1.13 work-surface improvements while restoring information scent,
   brand memory, and a visible distinction between tools and references. */

:root{
  --blueprint-navy:#0b1730;
  --blueprint-navy-2:#142858;
  --blueprint-cyan:#63dbc5;
  --reference-accent:#0b8c95;
}

/* A stable, restrained brand anchor in the global navigation. */
body .site-header .brand-mark,
body.home-premium .site-header .brand-mark{
  background:linear-gradient(135deg,#315ce7 0%,#5c4bd8 100%);
  box-shadow:0 5px 14px color-mix(in srgb,#315ce7 20%,transparent);
}
body .site-header .rd-nav a,
body.home-premium .site-header .rd-nav a{position:relative}
body .site-header .rd-nav a[aria-current="page"]::after,
body.rd-home .site-header .rd-nav a[href$="#tools"]::after,
body.topic-page .site-header .rd-nav a[href$="/topics/"]::after,
body.reference-home .site-header .rd-nav a[href$="/reference/"]::after,
body.reference-page .site-header .rd-nav a[href$="/reference/"]::after{
  content:"";
  position:absolute;
  left:10px;
  right:10px;
  bottom:3px;
  height:2px;
  border-radius:999px;
  background:var(--brand);
}

/* Home: search remains the first action, inside a compact blueprint surface. */
.rd-home .rd-home-hero{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  width:min(1180px,calc(100% - 48px));
  margin:26px auto 28px;
  padding:32px;
  border:1px solid rgba(132,166,255,.22);
  border-radius:18px;
  background:
    linear-gradient(rgba(119,153,235,.075) 1px,transparent 1px),
    linear-gradient(90deg,rgba(119,153,235,.075) 1px,transparent 1px),
    linear-gradient(135deg,var(--blueprint-navy),var(--blueprint-navy-2));
  background-size:28px 28px,28px 28px,auto;
  box-shadow:0 16px 42px rgba(11,23,48,.16);
}
.rd-home .rd-home-hero::after{
  content:"";
  position:absolute;
  z-index:-1;
  width:210px;
  height:210px;
  right:-72px;
  bottom:-112px;
  border:1px solid rgba(99,219,197,.32);
  border-radius:50%;
}
.rd-home .rd-home-hero h1{color:#fff;max-width:900px}
.rd-home .rd-home-hero p{color:#cbd6ee;font-size:15px}
.rd-home .rd-search{
  background:#fff;
  border-color:rgba(255,255,255,.78);
  box-shadow:0 9px 24px rgba(0,0,0,.16);
}
.rd-home .rd-search input{color:#172033}
.rd-home .rd-search input::placeholder{color:#66748a}
.rd-home .rd-search svg,.rd-home .rd-search kbd{color:#526176}

/* Home cards: one shared anatomy, with category cues and a clear destination. */
.rd-home .tool-card{
  --rd-card-accent:#315ce7;
  min-height:176px;
  border-top:3px solid var(--rd-card-accent);
  border-radius:13px;
  background:linear-gradient(155deg,color-mix(in srgb,var(--rd-card-accent) 4%,var(--surface)),var(--surface) 50%);
  box-shadow:0 5px 18px rgba(23,32,51,.055);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.rd-home .tool-card:hover{
  border-color:color-mix(in srgb,var(--rd-card-accent) 70%,var(--line));
  box-shadow:0 10px 24px rgba(23,32,51,.10);
  transform:translateY(-2px);
}
.rd-home .tool-card[data-category="image-print-tools"]{--rd-card-accent:#315ee8}
.rd-home .tool-card[data-category="web-developer-tools"]{--rd-card-accent:#147aa3}
.rd-home .tool-card[data-category="csv-data-tools"]{--rd-card-accent:#07866b}
.rd-home .tool-card[data-category="random-picker-tools"]{--rd-card-accent:#8653cf}
.rd-home .tool-card[data-category="date-time-tools"]{--rd-card-accent:#b36a16}
.rd-home .tool-card[data-category="business-calculators"]{--rd-card-accent:#c34c6e}
.rd-home .tool-card[data-category="text-list-tools"]{--rd-card-accent:#4f65c8}
.rd-home .tool-card[data-category="encoding-conversion-tools"]{--rd-card-accent:#7a5bba}
.rd-home .tool-card[data-category="color-tools"]{--rd-card-accent:#b64f85}
.rd-home .tool-card[data-category="publishing-event-tools"]{--rd-card-accent:#d06a46}
.rd-home .tool-card[data-category="file-check-tools"]{--rd-card-accent:#247c91}
.rd-home .tool-card[data-category="reference"]{--rd-card-accent:var(--reference-accent)}
.rd-home .tool-link{
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:100%;
  padding:18px 48px 48px 72px;
}
.rd-home .rd-card-icon{
  position:absolute;
  top:18px;
  left:18px;
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:11px;
  background:color-mix(in srgb,var(--rd-card-accent) 11%,var(--surface));
  color:var(--rd-card-accent);
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--rd-card-accent) 12%,transparent);
}
.rd-home .rd-card-icon svg{width:21px;height:21px}
.rd-home .tool-kicker{
  align-self:flex-start;
  display:inline-flex;
  padding:3px 8px;
  border-radius:999px;
  background:color-mix(in srgb,var(--rd-card-accent) 10%,var(--surface));
  color:var(--rd-card-accent);
  font-size:11px;
  font-weight:750;
}
.rd-home .tool-title{font-size:16px;margin-top:9px}
.rd-home .tool-desc{font-size:13px;line-height:1.65}
.rd-home .rd-card-action{
  display:inline-flex;
  position:absolute;
  left:18px;
  bottom:16px;
  color:var(--rd-card-accent);
  font-size:12px;
  font-weight:800;
}
.rd-home .favorite-btn{
  top:11px;
  right:10px;
  border:1px solid color-mix(in srgb,var(--rd-card-accent) 16%,var(--line));
  background:color-mix(in srgb,var(--surface) 94%,transparent);
}

/* Directory pages: compact brand, not a landing-page-sized obstacle. */
body.home-premium .hero{
  position:relative;
  overflow:hidden;
  padding:34px 0 30px!important;
  border-top:1px solid rgba(132,166,255,.12);
  border-bottom:1px solid rgba(132,166,255,.22);
  background:
    linear-gradient(rgba(119,153,235,.07) 1px,transparent 1px),
    linear-gradient(90deg,rgba(119,153,235,.07) 1px,transparent 1px),
    linear-gradient(135deg,var(--blueprint-navy),var(--blueprint-navy-2))!important;
  background-size:32px 32px,32px 32px,auto!important;
  color:#fff;
}
body.home-premium .hero::before{
  content:""!important;
  display:block!important;
  position:absolute;
  inset:auto -70px -135px auto;
  width:245px;
  height:245px;
  border:1px solid rgba(99,219,197,.28);
  border-radius:50%;
  background:none!important;
  opacity:1;
  pointer-events:none;
}
body.home-premium .hero::after{display:none!important}
body.home-premium .hero-grid{position:relative;z-index:1}
body.home-premium .hero-kicker{
  color:var(--blueprint-cyan);
  font-weight:800;
  letter-spacing:.09em;
}
body.home-premium .hero h1,
body.home-premium .hero-accent{
  color:#fff;
  -webkit-text-fill-color:currentColor;
}
body.home-premium .hero-subline{color:#cbd6ee}
body.home-premium .hero-stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  max-width:none;
  margin:18px 0 0;
  border:0;
  border-radius:0;
  overflow:visible;
  background:none;
  backdrop-filter:none;
}
body.home-premium .hero-stat-item{
  min-width:118px;
  padding:8px 11px;
  border:1px solid rgba(255,255,255,.14)!important;
  border-radius:10px;
  background:rgba(6,17,39,.34);
  text-align:left;
}
body.home-premium .hero-stat-item b{font-size:14px;color:#fff}
body.home-premium .hero-stat-item span{font-size:11px;color:#bac7df}
body.reference-home.home-premium .hero-kicker{color:#65e2d7}

/* Tool pages: restore a compact visual identity without pushing down the work area. */
body.rd-tool .tool-heading{
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  align-items:start;
  gap:13px;
}
body.rd-tool .tool-heading>.tool-icon{
  display:grid;
  width:44px;
  height:44px;
  flex-basis:44px;
  border-radius:12px;
}
body.rd-tool .tool-heading>.tool-icon svg{width:22px;height:22px}
body.rd-tool .checker-card{
  border-top:3px solid color-mix(in srgb,var(--brand) 74%,var(--line));
  box-shadow:0 7px 22px rgba(23,32,51,.06);
}
body.reference-page .tool-heading>.tool-icon{
  --icon-bg:color-mix(in srgb,var(--reference-accent) 11%,var(--surface));
  --icon-fg:var(--reference-accent);
}

/* Related tools use a recognizable BlueprintLab cue and an explicit action. */
.related-tool-card{
  position:relative;
  min-height:142px;
  padding:18px 18px 42px 58px!important;
  border-top:3px solid color-mix(in srgb,var(--brand) 62%,var(--line));
  border-radius:13px!important;
  background:linear-gradient(150deg,color-mix(in srgb,var(--brand) 3.5%,var(--surface)),var(--surface));
  box-shadow:0 4px 16px rgba(23,32,51,.045);
}
.related-tool-card .rd-card-icon,
body.topic-page .related-tool-card .rd-card-icon{
  position:absolute;
  top:16px;
  left:16px;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:9px;
  background:color-mix(in srgb,var(--brand) 10%,var(--surface));
  color:var(--brand);
  margin:0;
  padding:0;
}
.related-tool-card .rd-card-icon svg{width:17px;height:17px}
.related-tool-card .rd-card-action,
body.topic-page .related-tool-card .rd-card-action{
  display:inline-flex;
  position:absolute;
  left:58px;
  bottom:15px;
  color:var(--brand);
  font-size:12px;
  font-weight:800;
  line-height:1.4;
  margin:0;
  padding:0;
}
.related-tool-card:hover{
  border-color:color-mix(in srgb,var(--brand) 75%,var(--line));
  box-shadow:0 9px 22px rgba(23,32,51,.09);
  transform:translateY(-1px);
}

/* References are related to tools, but intentionally do not look identical. */
body.reference-home.home-premium .tool-grid{gap:14px}
body.reference-home.home-premium .tool-card{
  border:1px solid color-mix(in srgb,var(--reference-accent) 22%,var(--line));
  border-top:3px solid var(--reference-accent);
  border-radius:13px;
  background:linear-gradient(150deg,color-mix(in srgb,var(--reference-accent) 5%,var(--surface)),var(--surface) 56%);
  box-shadow:0 5px 18px rgba(23,32,51,.05);
}
body.reference-home.home-premium .tool-card:hover{
  border-color:color-mix(in srgb,var(--reference-accent) 68%,var(--line));
  box-shadow:0 10px 24px rgba(23,32,51,.09);
  transform:translateY(-1px);
}
body.reference-home.home-premium .tool-link{
  display:flex;
  flex-direction:column;
  padding:18px 48px 16px 18px;
}
body.reference-home.home-premium .tool-top{
  display:flex;
  align-items:flex-start;
  gap:12px;
}
body.reference-home.home-premium .tool-icon{
  display:grid;
  width:40px;
  height:40px;
  flex:0 0 40px;
  border-radius:11px;
  background:color-mix(in srgb,var(--reference-accent) 10%,var(--surface));
  color:var(--reference-accent);
}
body.reference-home.home-premium .tool-icon svg{width:21px;height:21px}
body.reference-home.home-premium .tool-kicker{color:var(--reference-accent)}
body.reference-home.home-premium .tool-kicker::before{
  background:color-mix(in srgb,var(--reference-accent) 12%,var(--surface));
  color:var(--reference-accent);
}
body.reference-home.home-premium .tool-title{margin-top:5px}
body.reference-home.home-premium .tool-desc{margin-top:12px;font-size:13px}
body.reference-home.home-premium .tool-footer{
  display:flex;
  margin-top:auto;
  padding-top:14px;
}
body.reference-home.home-premium .tool-tags{display:none}
body.reference-home.home-premium .open-label{
  display:inline-flex;
  width:auto;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  background:none;
  color:var(--reference-accent);
  font-size:12px;
}

/* Topic choices are navigation, not tool cards. */
.rd-topic-grid a{
  position:relative;
  border-left:3px solid color-mix(in srgb,var(--brand) 58%,var(--line));
  border-radius:11px;
  box-shadow:0 3px 12px rgba(23,32,51,.035);
}

@media(max-width:800px){
  .rd-home .rd-home-hero{
    width:calc(100% - 32px);
    margin-top:18px;
    padding:24px;
  }
  body.home-premium .hero{padding:28px 0 24px!important}
  body.home-premium .hero-stats{margin-top:14px}
  body.home-premium .hero-stat-item{min-width:104px}
}

@media(max-width:520px){
  .rd-home .rd-home-hero{
    width:calc(100% - 24px);
    margin:12px auto 22px;
    padding:20px;
    border-radius:14px;
    background-size:24px 24px,24px 24px,auto;
  }
  .rd-home .rd-home-hero h1{font-size:26px}
  .rd-home .rd-home-hero p{font-size:14px}
  .rd-home .rd-search{padding:7px 11px}
  .rd-home .tool-card{min-height:158px}
  .rd-home .tool-link{padding:15px 44px 44px 64px}
  .rd-home .rd-card-icon{top:15px;left:15px;width:37px;height:37px}
  .rd-home .rd-card-action{left:15px;bottom:13px}
  body.home-premium .hero{padding:24px 0 20px!important}
  body.home-premium .hero h1{font-size:clamp(26px,7vw,34px)}
  body.home-premium .hero-stat-item{min-width:0;flex:1 1 92px}
  body.rd-tool .tool-heading{grid-template-columns:38px minmax(0,1fr);gap:10px}
  body.rd-tool .tool-heading>.tool-icon{width:38px;height:38px;flex-basis:38px;border-radius:10px}
  .related-tool-card{min-height:132px;padding:15px 14px 39px 51px!important}
  .related-tool-card .rd-card-icon{top:14px;left:13px;width:28px;height:28px}
  .related-tool-card .rd-card-action{left:51px;bottom:13px}
  body.reference-home.home-premium .tool-link{padding:16px 44px 15px 15px}
}

@media(prefers-reduced-motion:reduce){
  .rd-home .tool-card:hover,
  .related-tool-card:hover,
  body.reference-home.home-premium .tool-card:hover{transform:none}
}
