/* Shared chrome for the board, planner, packets, generator and standards pages.
 * Token values equal the studio landing stylesheet and the inline styles of the Do-Now Studio page. */

:root {
  --page:        #e9f3fc;
  --ink:         #22364a;
  --heading:     #2b5d8c;
  --muted:       #7d95a8;
  --muted-deep:  #5b7086;
  --surface:     #fff;
  --line:        #d9e7f2;
  --field:       #f0f7fd;
  --field-line:  #cfe2f1;
  --tint:        #eef4f9;
  --tab-on:      #e3f0fb;
  --link:        #3d8fd1;
  --link-hover:  #2a6ea6;
  --primary:     #3d8fd1;
  --primary-dark:#2a6ea6;
  --good:        #3f7a44;
  --good-tint:   #e6f3e4;
  --warn:        #a05252;
  --warn-tint:   #fdf2f0;
  --gold:        #98700f;
  --gold-tint:   #fdf3dc;
  --core:        #2a6398;
  --shadow:      0 10px 34px rgba(43, 93, 140, .18);
  --card-shadow: 0 2px 10px rgba(61, 113, 161, .08);
  --font:        Nunito, Verdana, sans-serif;
  --sheet-font:  Andika, Verdana, sans-serif;
  --mono:        ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body.hb {
  background: linear-gradient(180deg, #dfeefb 0%, #eef6fd 300px, #f7fafc 100%);
  background-color: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}
body.hb a { color: var(--link); }
body.hb a:hover { color: var(--link-hover); }
[hidden] { display: none !important; }

.hb-bar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 30;
}
.hb-brand { display: flex; align-items: center; gap: 10px; flex: none; text-decoration: none; min-height: 44px; }
.hb-brand .dot { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, #ffd76a, var(--primary)); }
.hb-brand .name { font-size: 21px; font-weight: 800; color: var(--heading); }
.hb-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.hb-tab {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted-deep);
  text-decoration: none;
  white-space: nowrap;
}
body.hb a.hb-tab { color: var(--muted-deep); }
.hb-tab:hover { background: var(--tint); }
body.hb a.hb-tab.on { font-weight: 800; background: var(--tab-on); color: var(--heading); }
.hb-bar .grow { flex: 1; }

.hb-main { padding: 22px 28px 60px; }
.hb-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; }
.hb-head h1 { font-size: 22px; font-weight: 800; color: var(--heading); margin: 0; letter-spacing: -.01em; }
.hb-head .sub { font-size: 14px; color: var(--muted); }
.hb-cols { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }

.hb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 12px;
}
.hb-card h2 { font-size: 16px; font-weight: 800; color: var(--heading); margin: 0 0 8px; }
.hb-label { font-size: 14px; color: var(--muted); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin: 12px 0 6px; }
.hb-muted { color: var(--muted); font-size: 14px; }

.hb-field, .hb-select {
  width: 100%;
  padding: 11px 15px;
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
}
.hb-field:focus, .hb-select:focus { border-color: var(--link); box-shadow: 0 0 0 3px rgba(61, 143, 209, .16); }
.hb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 9px 18px;
  border-radius: 9px;
  border: 1px solid var(--field-line);
  background: var(--surface);
  color: var(--heading);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.hb-btn:hover:not(:disabled) { background: var(--tint); }
.hb-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.hb-btn.primary:hover:not(:disabled) { background: var(--primary-dark); }
.hb-btn.danger { color: var(--warn); border-color: #eccfc9; background: var(--warn-tint); }
.hb-btn:disabled { opacity: .45; cursor: not-allowed; }
body.hb a.hb-btn { color: var(--heading); }
body.hb a.hb-btn.primary { color: #fff; }

.hb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 20px;
  background: var(--surface);
  color: #4a637a;
  border: 1px solid var(--field-line);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.hb-chip.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 800; }
.hb-std {
  display: inline-block;
  font: 600 14px var(--mono);
  background: var(--tint);
  color: var(--heading);
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
}
.hb-level { display: inline-block; font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 20px; background: #e3f0fb; color: var(--core); }
.hb-level.foundational { background: var(--good-tint); color: var(--good); }
.hb-level.challenge { background: var(--gold-tint); color: var(--gold); }

.hb-toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #22252a;
  color: #fff;
  font-size: 14px;
  padding: 9px 14px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
  max-width: 420px;
  z-index: 90;
}

.hb-picker { display: grid; gap: 8px; }
.hb-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hb-stdchip { display: inline-flex; align-items: center; gap: 6px; background: var(--tint); border-radius: 8px; padding: 2px 4px 2px 2px; }
.hb-x { border: 0; background: transparent; color: var(--muted-deep); font-size: 18px; line-height: 1; min-width: 32px; min-height: 32px; cursor: pointer; border-radius: 6px; }
.hb-x:hover { background: #dde9f3; color: var(--warn); }
.hb-results { display: grid; gap: 4px; }
.hb-result {
  display: flex; gap: 10px; align-items: baseline; text-align: left;
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px;
  padding: 8px 10px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; min-height: 44px;
}
.hb-result:hover { border-color: var(--link); }
.hb-result.on { background: var(--tab-on); border-color: var(--link); }
.hb-sheetlist { display: grid; gap: 4px; }
.hb-sheetrow { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; background: var(--surface); }
.hb-sheetrow.on { background: #f5faff; }
.hb-sheetname { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; padding: 8px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.hb a.hb-mini { font-size: 14px; font-weight: 700; text-decoration: none; padding: 10px 6px; }
.hb-note { background: var(--warn-tint); color: var(--warn); border-radius: 8px; padding: 8px 12px; font-size: 14px; }

@media (max-width: 1100px), (pointer: coarse) {
  .hb-chip { min-height: 44px; }
  .hb-x { min-width: 44px; min-height: 44px; }
  body.hb a.hb-mini { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; }
}

@media (max-width: 860px) {
  .hb-bar { padding: 10px 14px; gap: 8px; position: static; }
  .hb-tab { padding: 8px 12px; }
  .hb-main { padding: 16px 14px 48px; }
  .hb-cols { grid-template-columns: 1fr; }
}
