/* Coffee Institute — hub dashboard. */
:root {
  --canvas: #14100D; --surface: #1E1813; --surface-alt: #2A211A;
  --ink: #F3EDE6; --ink-soft: #B3A697; --crema: #D9A05B; --espresso: #6F4427;
  --leaf: #7FA868; --cherry: #C8553D; --border: #3A2E24; --radius: 14px;
  --shadow: 0 16px 48px -16px rgba(0,0,0,.7);
  --sans: "Atkinson Hyperlegible", system-ui, sans-serif; --serif: "Bricolage Grotesque", "Arial Black", sans-serif; --mono: "Spline Sans Mono", monospace;
}

/* Keyboard focus ring. Every interactive element gets a visible indicator;
   :focus-visible keeps it off mouse clicks. outline-offset leaves a gap so the
   ring still reads when the control itself is filled with the accent. */
:focus-visible {
  outline: 3px solid var(--crema);
  outline-offset: 2px;
  border-radius: 2px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--canvas); color: var(--ink); font-family: var(--sans); line-height: 1.55; }
.hub { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
.hub-eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--crema); font-weight: 700; }
.hub-title { font-family: var(--serif); font-size: 52px; margin: 6px 0 8px; }
.hub-sub { color: var(--ink-soft); max-width: 640px; margin: 0 0 26px; }
.hub-meta { font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); margin-bottom: 30px; }

.hub-grid { display: grid; grid-template-columns: 2.2fr 1fr; gap: 26px; align-items: start; }
.hub-courses { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hub-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; transition: transform .15s, border-color .15s; }
.hub-card:hover { transform: translateY(-3px); border-color: var(--crema); }
.hub-card.soon { opacity: .55; }
.hub-card.soon:hover { transform: none; border-color: var(--border); }
.hub-card-img { height: 130px; }
.hub-card-img img { width: 100%; height: 100%; object-fit: cover; }
.hub-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hub-card-kicker { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.hub-card-title { font-family: var(--serif); font-size: 21px; }
.hub-card-desc { font-size: 13px; color: var(--ink-soft); flex: 1; }
.hub-card-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-soft); margin-top: 8px; }
.hub-badge { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.hub-badge.done { background: rgba(127,168,104,.18); color: var(--leaf); }
.hub-badge.progress { background: rgba(217,160,91,.16); color: var(--crema); }
.hub-badge.new { background: var(--surface-alt); color: var(--ink-soft); }
.hub-badge.soon { background: var(--surface-alt); color: var(--ink-soft); }

.hub-side { display: flex; flex-direction: column; gap: 18px; }
.hub-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.hub-panel h2 { font-family: var(--serif); font-size: 18px; margin: 0 0 10px; color: var(--crema); }
.hub-news-item { padding: 9px 0; border-bottom: 1px solid var(--border); }
.hub-news-date { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
.hub-news-text { font-size: 13.5px; }
.hub-cert { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.hub-cert .medal { font-size: 18px; }
.hub-cert .pct { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--leaf); }
.hub-dim { color: var(--ink-soft); font-size: 13px; }
.hub-btn {
  font-family: var(--mono); font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.09em; text-transform: uppercase;
  background: var(--crema); color: #1A1208;
  border: 2px solid #1A1208; border-radius: 3px;
  padding: 11px 20px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 9px;
  box-shadow: 4px 4px 0 var(--espresso);
  transition: transform .12s ease, box-shadow .12s ease;
}
.hub-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--espresso); }
.hub-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--espresso); }
.msr {
  font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal;
  font-size: 1.18em; line-height: 0; display: inline-block; vertical-align: -0.185em;
  letter-spacing: normal; text-transform: none; font-variation-settings: 'FILL' 1, 'opsz' 24;
}
.hub-btn.secondary { background: transparent; color: var(--crema); border-color: var(--crema); box-shadow: 4px 4px 0 rgba(111,68,39,.45); }
.hub-actions { display: flex; gap: 10px; margin: 18px 0 30px; }

/* syllabus modal */
.hub-modal-overlay { position: fixed; inset: 0; background: rgba(10,8,6,.8); backdrop-filter: blur(5px); display: none; place-items: center; z-index: 100; padding: 28px; }
.hub-modal-overlay.on { display: grid; }
.hub-modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-width: 640px; max-height: 80vh; overflow-y: auto; padding: 28px 32px; position: relative; }
.hub-modal h2 { font-family: var(--serif); margin: 0 0 12px; }
/* These course rows were <h4> and are now <h3>, so the outline runs h1 > h2 > h3
   without skipping. font-size is pinned to the 1em an h4 rendered at, so the
   heading level changed but the design did not. */
.hub-modal h3 { color: var(--crema); margin: 16px 0 4px; font-size: 1em; }
.hub-modal p, .hub-modal li { font-size: 14px; color: var(--ink-soft); }
.hub-modal-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; font: inherit; background: var(--surface-alt); border: 1px solid var(--border); color: var(--ink); border-radius: 8px; cursor: pointer; }

.hub-device-note { font-size: 12px; color: var(--ink-soft); border: 1px dashed var(--border); border-radius: 10px; padding: 10px 14px; margin-top: 22px; }
@media (max-width: 900px) { .hub-grid { grid-template-columns: 1fr; } .hub-courses { grid-template-columns: 1fr; } .hub-title { font-size: 38px; } }
