/* ============================================================
   NZ ITF TRAINING HUB — v8: calmer layout
   ============================================================ */

/* One title is enough: the page heading already says Training Hub */
.hub2.v8 .hub2-brand, .hub2.v8 .hub2-ring-box { display: none; }
.v3brand { display: none !important; }
.v3bar { border-radius: 12px 12px 0 0; }

/* ---------- Sidebar: four short groups ---------- */
.hub2.v8 { grid-template-columns: 210px 1fr; border-radius: 0 0 12px 12px; overflow: hidden; }
.hub2.v8 .hub2-side { padding-top: 8px; }
.v8grp { padding: 6px 0 10px; }
.v8grp + .v8grp { border-top: 1px solid var(--line); }
.v8grp-label { font: 600 10px/1 var(--body, Inter, sans-serif); letter-spacing: 2px; text-transform: uppercase; color: var(--grey, #888780); padding: 12px 20px 6px; }
.hub2.v8 .hub2-nav a { padding: 9px 20px; font-size: 13.5px; }
.hub2.v8 .hub2-nav a svg { width: 16px; height: 16px; opacity: .85; }
.hub2.v8 .hub2-nav a.on svg { opacity: 1; }

/* ---------- Today ---------- */
.hub2.v8.v8-today .hub2-ctx { display: none; }
.hub2.v8 .v4today { padding: 4px 0 0; }
.hub2.v8 .v4hero { align-items: center; padding: 6px 4px 22px; }
.hub2.v8 .v4hero h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.v8next { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.v8next-t { color: #D3D1C7; font: 600 13px/1.4 var(--body, Inter, sans-serif); }
.v8go { background: #fff; color: #0b0b0b; border: 0; cursor: pointer; border-radius: 9px; padding: 11px 18px;
  font: 600 12.5px var(--body, Inter, sans-serif); letter-spacing: .4px; transition: background .2s, transform .2s; }
.v8go:hover { background: #D3D1C7; transform: translateY(-1px); }

/* Stats become a quiet strip instead of three boxes */
.hub2.v8 .v4stats { gap: 0; border: 1px solid #26261f; border-radius: 12px; background: #0b0b0b; overflow: hidden; }
.hub2.v8 .v4stat { border: 0; border-radius: 0; background: none; padding: 12px 20px; }
.hub2.v8 .v4stat + .v4stat { border-left: 1px solid #26261f; }
.hub2.v8 .v4stat b { font-size: 1.2rem; }

/* Cards: focus gets the width, the rest sit beside it */
.hub2.v8 .v4grid { grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; }
.hub2.v8 .v4card { padding: 20px; }
.hub2.v8 .v4hint { font-size: 11.5px; }

/* Badges: folded until tapped */
.v8fold { grid-column: 1 / -1; padding: 0 !important; }
.v8fold .v4h { margin: 0; padding: 16px 20px; cursor: pointer; user-select: none; }
.v8fold .v4h span u { text-decoration: none; color: #D3D1C7; border-bottom: 1px solid #444441; }
.v8fold .v4h:hover span u { color: #fff; }
.v8fold .v4shelf { display: none; padding: 0 20px 20px; }
.v8fold.open .v4shelf { display: grid; }

@media (max-width: 1100px) { .hub2.v8 .v4grid { grid-template-columns: 1fr 1fr; } .hub2.v8 .v4grid > .v4card:first-child { grid-column: 1 / -1; } }

/* ---------- Phones ---------- */
.v8tabs, .v8sheet { display: none; }
@media (max-width: 860px) {
  .hub2.v8 { grid-template-columns: 1fr; border-radius: 0 0 12px 12px; }
  .hub2.v8 .hub2-side { display: none !important; }
  .hub2.v8 .v4grid { grid-template-columns: 1fr; }
  .hub2.v8 .v4grid > .v4card:first-child { grid-column: auto; }
  .hub2.v8 .v4hero { padding-bottom: 16px; }
  .hub2.v8 .v4stats { width: 100%; }
  .hub2.v8 .v4stat { flex: 1; padding: 10px 6px; }
  .v8next { width: 100%; }
  .v8go { width: 100%; }

  .v8tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9600;
    background: rgba(11,11,11,.97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    border-top: 1px solid #33332f; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .v8tabs a, .v8tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 7px 2px 6px; color: #8d8c86; background: none; border: 0; cursor: pointer; position: relative;
    font: 600 10.5px/1 var(--body, Inter, sans-serif); letter-spacing: .3px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
  .v8tabs svg { width: 20px; height: 20px; }
  .v8tabs .on { color: #fff; }
  .v8tabs .on::before { content: ''; position: absolute; top: -6px; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--belt, #fff); }
  body { padding-bottom: 70px; }
  .v4toasts { bottom: 86px !important; }

  .v8sheet { display: block; position: fixed; inset: 0; z-index: 9500; pointer-events: none; }
  .v8sheet .v8mask { position: absolute; inset: 0; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .25s; }
  .v8sheet .v8panel { position: absolute; left: 0; right: 0; bottom: 0; background: #131312; border-top: 1px solid #33332f;
    border-radius: 18px 18px 0 0; padding: 8px 16px calc(84px + env(safe-area-inset-bottom)); transform: translateY(100%);
    transition: transform .3s cubic-bezier(.2,.8,.2,1); max-height: 82vh; overflow-y: auto; }
  .v8sheet.on { pointer-events: auto; }
  .v8sheet.on .v8mask { opacity: 1; }
  .v8sheet.on .v8panel { transform: none; }
  .v8grab { width: 40px; height: 4px; border-radius: 2px; background: #444441; margin: 4px auto 6px; }
  .v8sg .v8grp-label { padding: 14px 4px 8px; }
  .v8sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .v8sgrid a { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border: 1px solid #26261f; border-radius: 11px;
    background: #0b0b0b; color: #D3D1C7; font: 600 13px/1.25 var(--body, Inter, sans-serif); text-decoration: none; }
  .v8sgrid a svg { width: 18px; height: 18px; flex: none; }
  .v8sgrid a.on { border-color: var(--belt, #fff); color: #fff; }
  body.v8lock { overflow: hidden; }
}

/* Breathing room inside Today */
.hub2.v8 .v4today { padding: 22px 22px 24px; }
@media (max-width: 860px) { .hub2.v8 .v4today { padding: 16px 14px 20px; } }

/* Pattern step buttons (were unstyled) */
.mv-nav .mini { border: 1px solid #444441; background: #0b0b0b; color: #D3D1C7; border-radius: 9px; cursor: pointer;
  font: 600 12.5px var(--body, Inter, sans-serif); letter-spacing: .4px; padding: 10px 16px; white-space: nowrap; transition: border-color .2s, color .2s; }
.mv-nav .mini:not(:disabled):hover { border-color: #fff; color: #fff; }
.mv-nav .mini[data-mv="1"] { background: #fff; color: #0b0b0b; border-color: #fff; }
.mv-nav .mini[data-mv="1"]:hover { background: #D3D1C7; color: #0b0b0b; }

/* Phones: one-line context bar and search beside the grade chip */
@media (max-width: 860px) {
  .v3bar { flex-wrap: nowrap !important; gap: 8px !important; }
  .v3bar .v3search { order: 0 !important; flex: 1 1 auto !important; flex-basis: auto !important; min-width: 0; }
  .v3bar .v3search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .v3bar .v3search kbd { display: none; }
  .v3bar .v3chips { flex: none; }
  .hub2.v8 .hub2-ctx { flex-wrap: nowrap; gap: 10px; padding: 10px 14px; }
  .hub2.v8 .hub2-ctx .t { min-width: 0; }
  .hub2.v8 .hub2-ctx .t b { font-size: 12.5px; line-height: 1.35; }
  .hub2.v8 .hub2-ctx .t span { display: none; }
  .hub2.v8 .hub2-ctx .swatch { width: 26px; height: 16px; }
  .hub2.v8 .hub2-continue { padding: 9px 12px; font-size: 10px; letter-spacing: 1px; white-space: nowrap; }
}
@media (max-width: 860px) {
  .hub2.v8 .hub2-continue { font-size: 0 !important; letter-spacing: 0 !important; padding: 9px 13px; }
  .hub2.v8 .hub2-continue::after { content: 'Continue \2192'; font-size: 11px; letter-spacing: .8px; }
  .hub2.v8 .hub2-ctx .t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}

/* ============================================================
   v9 look: NZITF blue, mountain hero, dashboard Today
   ============================================================ */
:root { --hb: #2f7bdc; --hb2: #5aa2ff; --hnavy: #0a1322; --hnavy2: #0d192c; --hline: rgba(90,150,240,.20); }

/* ---------- Hero ---------- */
.thub-hero { position: relative; overflow: hidden; padding: 64px 0 46px;
  background: url('dash/hero-bg.webp') center 40% / cover no-repeat, #050a14; border-bottom: 1px solid var(--hline); }
.thub-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, #F2F1EC 0 16.66%, #F0C93C 16.66% 33.33%, #3F9C55 33.33% 50%, #2E6FB2 50% 66.66%, #C43B34 66.66% 83.33%, #000 83.33%); }
.thub-hero .wrap { position: relative; z-index: 2; max-width: 1380px; }
.th-fern { position: absolute; left: -60px; top: 10px; width: 420px; opacity: .14; transform: rotate(-28deg); z-index: 1; pointer-events: none; }
.th-kick { position: absolute; right: max(2vw, calc(50% - 700px)); bottom: -6px; height: 112%; max-height: 520px; z-index: 1; pointer-events: none;
  filter: drop-shadow(0 0 30px rgba(47,123,220,.35)) drop-shadow(0 20px 40px rgba(0,0,0,.6)); }
.th-title { font-family: var(--display); font-weight: 800; font-style: italic; text-transform: uppercase; letter-spacing: .5px; line-height: 1;
  font-size: clamp(2.3rem, 6vw, 4.6rem); background: linear-gradient(180deg, #ffffff 0%, #e8edf5 45%, #9aa6b8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 14px rgba(0,0,0,.6)); max-width: 820px; }
.th-tag { margin-top: 14px; color: var(--hb2); font: 700 clamp(13px, 1.6vw, 18px)/1.2 var(--body); letter-spacing: .42em; text-transform: uppercase; }
.th-tag i { font-style: normal; color: #9fb8dc; padding: 0 .3em; }
.th-lede { margin-top: 16px; max-width: 600px; color: #c9d3e2; font-size: 17px; line-height: 1.65; }
.th-quick { display: grid; grid-template-columns: repeat(8, minmax(0, 104px)); gap: 12px; margin-top: 30px; }
.th-quick a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; min-height: 96px; padding: 12px 6px;
  border: 1px solid rgba(110,165,245,.45); border-radius: 12px; background: linear-gradient(180deg, rgba(14,28,52,.85), rgba(6,12,24,.9));
  color: #fff; font: 600 12px/1.25 var(--body); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 24px rgba(0,0,0,.35); transition: transform .2s, border-color .2s, box-shadow .2s; }
.th-quick a svg { width: 28px; height: 28px; }
.th-quick a:hover { transform: translateY(-3px); border-color: var(--hb2); box-shadow: 0 0 0 1px rgba(90,162,255,.3), 0 0 26px rgba(47,123,220,.45); }
@media (max-width: 1240px) { .th-kick { opacity: .45; } }
@media (max-width: 980px) { .th-quick { grid-template-columns: repeat(4, 1fr); } .th-kick { right: -120px; opacity: .3; } }
@media (max-width: 600px) {
  .thub-hero { padding: 40px 0 30px; }
  .th-tag { letter-spacing: .25em; }
  .th-lede { font-size: 15px; }
  .th-quick { gap: 8px; margin-top: 22px; }
  .th-quick a { min-height: 78px; font-size: 10.5px; border-radius: 10px; }
  .th-quick a svg { width: 22px; height: 22px; }
  .th-kick { display: none; }
  .th-fern { width: 260px; }
}

/* ---------- Layout: hub + Latest updates ---------- */
.thub-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.thub-layout.is-today { grid-template-columns: minmax(0, 1fr) 300px; }
.thub-news { display: none; }
.thub-layout.is-today .thub-news { display: block; }
@media (max-width: 1200px) { .thub-layout.is-today { grid-template-columns: minmax(0, 1fr); } }
.v3bar { scroll-margin-top: 150px; }
@media (max-width: 860px) { .v3bar { scroll-margin-top: 110px; } }

.thub-news { border: 1px solid var(--hline); border-radius: 14px; background: linear-gradient(180deg, var(--hnavy2), var(--hnavy)); padding: 0 14px 16px; overflow: hidden; }
.thub-news h2 { margin: 0 -14px 14px; padding: 14px 18px; font: 800 italic 17px/1 var(--display); text-transform: uppercase; letter-spacing: .5px; color: #fff;
  background: linear-gradient(90deg, var(--hb), rgba(47,123,220,0) 85%); }
.tn-item { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid rgba(90,150,240,.14); border-radius: 10px; margin-bottom: 8px; background: rgba(4,9,18,.55); transition: border-color .2s, background .2s; }
.tn-item:hover { border-color: rgba(90,162,255,.55); background: rgba(10,22,42,.8); }
.tn-item img { width: 64px; height: 50px; object-fit: cover; border-radius: 6px; flex: none; background: #111; }
.tn-item .tn-ic { width: 64px; height: 50px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(47,123,220,.16); color: var(--hb2); }
.tn-item b { display: block; color: #fff; font: 600 13.5px/1.3 var(--body); }
.tn-item em { display: block; font-style: normal; color: #93a3bb; font-size: 12px; margin-top: 3px; }
.tn-event em { color: var(--hb2); }
.tn-none { color: #93a3bb; font-size: 13px; padding: 6px 4px 10px; }
.tn-all { display: inline-flex; margin: 8px auto 0; padding: 9px 18px; border: 1px solid rgba(110,165,245,.5); border-radius: 999px; color: #fff; font: 600 12.5px var(--body); transition: background .2s; }
.tn-all:hover { background: rgba(47,123,220,.25); }
.thub-news { text-align: left; }
.thub-news .tn-all { display: table; }

/* ---------- Hub shell in navy + blue ---------- */
.v3bar { background: var(--hnavy) !important; border-color: var(--hline) !important; }
.hub2.v8 { background: var(--hnavy); border-color: var(--hline); }
.hub2.v8 .hub2-side { background: #070e1a; border-right-color: var(--hline); }
.hub2.v8 .v8grp + .v8grp { border-top-color: var(--hline); }
.hub2.v8 .v8grp-label { color: #7f94b3; }
.hub2.v8 .hub2-nav a:hover { background: rgba(47,123,220,.10); }
.hub2.v8 .hub2-nav a.on { background: linear-gradient(90deg, rgba(47,123,220,.28), rgba(47,123,220,.04)); border-left-color: var(--hb2); }
.hub2.v8 .hub2-ctx { background: #070e1a; border-bottom-color: var(--hline); }
.hub2.v8 .v4card { background: var(--hnavy2); border-color: var(--hline); }

/* ---------- Today dashboard ---------- */
.hub2.v8 .v4hero { display: none; }
.v9dash { margin-bottom: 4px; }
.v9prog { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 20px 22px; border: 1px solid var(--hline); border-radius: 14px;
  background: radial-gradient(600px 160px at 0% 0%, rgba(47,123,220,.18), transparent 70%), var(--hnavy2); }
.v9belt { width: 104px; height: 104px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--hb2); box-shadow: 0 0 24px rgba(47,123,220,.45), inset 0 0 18px rgba(47,123,220,.25); background: #050b16; }
.v9hello { font: 600 11px var(--body); letter-spacing: 2px; text-transform: uppercase; color: var(--hb2); }
.v9pmain h3 { font: 700 22px/1.2 var(--body); color: #fff; margin: 4px 0 6px; }
.v9pmain p { color: #c9d3e2; font-size: 14px; margin: 0 0 12px; }
.v9pmain p b { color: #fff; }
.v9bar { height: 12px; border-radius: 999px; background: #050b16; border: 1px solid rgba(90,150,240,.25); overflow: hidden; max-width: 420px; }
.v9bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2fd16b, #7be36a); box-shadow: 0 0 12px rgba(80,220,110,.55); transition: width .6s; }
.v9barl { display: flex; justify-content: space-between; max-width: 420px; color: #93a3bb; font-size: 11.5px; margin-top: 5px; }
.v9go { margin-top: 12px; background: var(--hb); color: #fff; border: 0; border-radius: 999px; padding: 10px 18px; cursor: pointer; font: 600 12.5px var(--body); transition: background .2s, transform .2s; }
.v9go:hover { background: var(--hb2); transform: translateY(-1px); }
.v9stats { display: grid; grid-template-columns: repeat(3, 112px); gap: 10px; }
.v9stats div { text-align: center; padding: 12px 6px; border: 1px solid var(--hline); border-radius: 12px; background: rgba(4,9,18,.6); }
.v9stats i { display: block; color: #cfe0ff; line-height: 0; margin-bottom: 6px; }
.v9stats b { display: block; font: 800 italic 22px/1.1 var(--display); color: #fff; }
.v9stats span { display: block; color: #93a3bb; font-size: 11.5px; line-height: 1.3; margin-top: 3px; }

.v9feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.v9card { position: relative; display: block; min-height: 190px; border-radius: 14px; overflow: hidden; border: 1px solid var(--hline); color: #fff; }
.v9img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s ease; }
.v9card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,10,20,.05) 20%, rgba(5,10,20,.88) 78%); }
.v9card:hover .v9img { transform: scale(1.05); }
.v9card:hover { border-color: rgba(90,162,255,.6); box-shadow: 0 0 24px rgba(47,123,220,.3); }
.v9ct { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: flex; gap: 12px; align-items: flex-end; }
.v9play { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; background: rgba(47,123,220,.85); }
.v9ct b { display: block; font: 800 italic 18px/1.1 var(--display); text-transform: uppercase; letter-spacing: .3px; }
.v9ct em { display: block; font-style: normal; color: #d5deeb; font-size: 12.5px; line-height: 1.45; margin-top: 4px; }
.v9sub { margin: 22px 2px 12px; font: 600 11px var(--body); letter-spacing: 2px; text-transform: uppercase; color: #7f94b3; }

@media (max-width: 1100px) {
  .v9prog { grid-template-columns: auto 1fr; }
  .v9stats { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .v9prog { grid-template-columns: 1fr; text-align: left; padding: 18px; gap: 14px; }
  .v9belt { width: 76px; height: 76px; }
  .v9belt svg { width: 62px; }
  .v9go { width: 100%; }
  .v9feat { grid-template-columns: 1fr; }
  .v9card { min-height: 150px; }
  .thub-news { margin-bottom: 10px; }
}
/* v9 tweaks */
.thub-hero { padding: 78px 0 52px; }
.th-kick { height: 100%; max-height: 560px; bottom: 0; }
.v9stats { grid-template-columns: repeat(3, 98px); }
@media (max-width: 1400px) { .thub-layout.is-today .v9prog { grid-template-columns: auto 1fr; } .thub-layout.is-today .v9stats { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .v8sheet .v8panel { visibility: hidden; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s; }
  .v8sheet.on .v8panel { visibility: visible; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s; }
  .thub-layout .hub2 { min-height: 0; }
}
/* Ben's photo in the hero */
.th-kick { height: 104%; max-height: 600px; bottom: -2%; right: max(4vw, calc(50% - 640px)); filter: drop-shadow(0 0 26px rgba(47,123,220,.45)) drop-shadow(0 24px 30px rgba(0,0,0,.65)); }
@media (min-width: 1241px) { .thub-hero { padding: 84px 0 58px; } }
.th-kick { height: 94%; bottom: 0; }
@media (max-width: 600px) {
  .th-kick { display: block; height: 240px; max-height: none; top: 22px; bottom: auto; right: 6px; opacity: 1; }
  .th-title { max-width: 62%; font-size: 2.15rem; }
  .th-tag { max-width: 62%; }
}
