/* SQL4 Handbook component owner.
   Index cards use only the hbook-card namespace so legacy module/course styles
   cannot change their geometry. Theme values come from semantic site tokens. */

html[data-hindex-theme] body #view > .hbook-v1{
  width:100%;
  max-width:1500px;
  margin:0 auto;
  padding:24px 28px 56px;
  color:var(--h-text);
}

html[data-hindex-theme] body #view > .hbook-v1 .hbook-index-toolbar{
  min-height:44px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:0 0 18px;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-index-toolbar > div{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-kicker{
  font-family:var(--h-font-mono);
  font-size:12px;
  font-weight:700;
  letter-spacing:.12em;
  color:var(--h-link);
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-index-toolbar strong{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:0 10px;
  border:1px solid var(--h-border);
  border-radius:999px;
  background:var(--h-surface);
  color:var(--h-muted);
  font-size:12px;
  font-weight:600;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-search{
  width:min(380px,38vw);
  height:42px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:0 12px;
  border:1px solid var(--h-border-strong);
  border-radius:11px;
  background:var(--h-surface);
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-search:focus-within{
  border-color:var(--h-primary-bg);
  box-shadow:0 0 0 3px var(--h-accent-line);
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-search > span{color:var(--h-muted)}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-search input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--h-text);
  font:inherit;
  font-size:14px;
  box-shadow:none;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-search input::placeholder{color:var(--h-muted)}

html[data-hindex-theme] body #view > .hbook-v1 .hbook-native-index > .page-head{
  margin:0 0 20px;
  padding:0;
  border:0;
  background:transparent;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-native-index > .page-head:after{display:none}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-native-index > .page-head .eyebrow{
  color:var(--h-link);
  font-family:var(--h-font-mono);
  font-size:12px;
  font-weight:700;
  letter-spacing:.12em;
  text-transform:uppercase;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-native-index > .page-head h2{
  margin:6px 0 6px;
  color:var(--h-text);
  font-size:28px;
  line-height:1.2;
  font-weight:800;
  letter-spacing:-.02em;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-native-index > .page-head p{
  max-width:760px;
  margin:0;
  color:var(--h-muted);
  font-size:14px;
  line-height:1.6;
}

html[data-hindex-theme] body #view > .hbook-v1 .hbook-card-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  overflow:visible;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card{
  position:relative;
  display:grid;
  grid-template-columns:46px minmax(0,1fr) 26px;
  gap:10px;
  align-items:center;
  min-width:0;
  min-height:92px;
  padding:13px 14px;
  border:1px solid var(--h-border);
  border-radius:13px;
  background:var(--h-surface);
  color:var(--h-text);
  text-decoration:none;
  box-shadow:0 1px 2px color-mix(in srgb,var(--h-text) 5%,transparent);
  transition:background-color .14s ease,border-color .14s ease,box-shadow .14s ease;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card:hover{
  background:var(--h-raised);
  border-color:var(--h-soft-border);
  box-shadow:0 4px 14px color-mix(in srgb,var(--h-text) 7%,transparent);
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card:focus-visible{
  outline:2px solid var(--h-primary-bg);
  outline-offset:2px;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card:after{
  content:'→';
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:var(--h-raised);
  color:var(--h-link);
  font-size:12px;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card-id{
  width:46px;
  min-width:46px;
  height:32px;
  display:grid;
  place-items:center;
  padding:0 5px;
  border:1px solid var(--h-accent-line);
  border-radius:8px;
  background:var(--h-soft-bg);
  color:var(--h-link);
  font-family:var(--h-font-mono);
  font-size:10px;
  font-weight:700;
  line-height:1;
  white-space:nowrap;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card-body{min-width:0}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card-title{
  display:block;
  margin:0 0 4px;
  color:var(--h-text);
  font-size:14.5px;
  font-weight:700;
  line-height:1.35;
  overflow-wrap:normal;
  word-break:normal;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card-desc{
  display:-webkit-box;
  overflow:hidden;
  color:var(--h-muted);
  font-size:12px;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-card .chip.gold{
  display:inline-flex;
  margin-left:5px;
  font-size:9px;
  vertical-align:1px;
}
html[data-hindex-theme] body #view > .hbook-v1 .hbook-empty{
  padding:28px;
  text-align:center;
  color:var(--h-muted);
}

@media(max-width:1320px){
  html[data-hindex-theme] body #view > .hbook-v1 .hbook-card-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:980px){
  html[data-hindex-theme] body #view > .hbook-v1{padding:20px 18px 44px}
  html[data-hindex-theme] body #view > .hbook-v1 .hbook-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  html[data-hindex-theme] body #view > .hbook-v1 .hbook-index-toolbar{align-items:stretch;flex-direction:column;gap:10px}
  html[data-hindex-theme] body #view > .hbook-v1 .hbook-search{width:100%}
}
@media(max-width:620px){
  html[data-hindex-theme] body #view > .hbook-v1{padding:16px 12px 36px}
  html[data-hindex-theme] body #view > .hbook-v1 .hbook-card-grid{grid-template-columns:1fr}
  html[data-hindex-theme] body #view > .hbook-v1 .hbook-card{min-height:86px;padding:12px;grid-template-columns:44px minmax(0,1fr) 24px}
}
@media(prefers-reduced-motion:reduce){
  html[data-hindex-theme] body #view > .hbook-v1 .hbook-card{transition:none}
}
