@import url("tokens.css");
@import url("feature-premium.css");
:root{
  color-scheme:dark;
  --bg:#071016;--bg2:#0b1419;--panel:#0d171d;--panel2:#111c22;
  --text:#f5f7f6;--muted:#9fa9a3;--line:rgba(221,177,141,.2);
  --accent:#d5a173;--accent2:#e7b98f;--accent3:#f1d1b5;
  --ok:#89c79d;--danger:#df887f;--shadow:0 24px 70px rgba(0,0,0,.38)
}
*{box-sizing:border-box}
html{background:var(--bg);scroll-behavior:smooth}
body{
  margin:0;
  background:
    radial-gradient(circle at 80% -8%,rgba(231,185,143,.13),transparent 28rem),
    radial-gradient(circle at 8% 26%,rgba(105,150,170,.045),transparent 20rem),
    linear-gradient(180deg,var(--bg2),var(--bg) 42%,#05090b);
  color:var(--text);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased
}
a,button,input,select{font:inherit}
button{color:inherit}
.shell{width:min(980px,100%);margin:auto;min-height:100vh;padding:calc(env(safe-area-inset-top) + 16px) 18px calc(env(safe-area-inset-bottom) + 48px)}
.top{
  position:sticky;top:0;z-index:20;height:62px;display:flex;align-items:center;justify-content:space-between;
  margin:0 -8px 22px;padding:0 8px;background:linear-gradient(180deg,rgba(7,16,22,.9),rgba(7,16,22,.62),transparent);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)
}
.brand{display:flex;gap:9px;align-items:center;font-weight:950;letter-spacing:.05em;text-decoration:none;color:inherit}
.mark{
  display:grid;place-items:center;width:36px;height:36px;border:1px solid rgba(231,185,143,.28);
  border-radius:12px;background:linear-gradient(145deg,#221a14,#151412);color:var(--accent2);
  box-shadow:0 10px 30px rgba(0,0,0,.26)
}
.back{color:#b7c1bb;text-decoration:none;font-weight:800;font-size:12px}
.hero{
  padding:30px;border:1px solid var(--line);border-radius:28px;
  background:
    radial-gradient(circle at 92% 0,rgba(231,185,143,.12),transparent 18rem),
    linear-gradient(150deg,#16191a,#0f171b 62%,#0b1013);
  box-shadow:var(--shadow);position:relative;overflow:hidden
}
.hero:after{
  content:"8";position:absolute;right:-18px;bottom:-78px;font-size:250px;line-height:1;font-weight:1000;
  color:rgba(231,185,143,.035);letter-spacing:-.1em;pointer-events:none
}
.kicker{font-size:10px;letter-spacing:.16em;font-weight:950;color:var(--accent2)}
.hero h1{font-size:clamp(38px,8vw,62px);line-height:.95;letter-spacing:-.055em;margin:10px 0 12px;position:relative;z-index:1}
.hero p{margin:0;color:#c2cbc6;font-size:14px;line-height:1.55;max-width:720px;position:relative;z-index:1}
.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:18px}
.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.card{
  border:1px solid var(--line);background:
    linear-gradient(145deg,rgba(17,26,31,.96),rgba(9,15,19,.96));
  border-radius:22px;padding:20px;box-shadow:0 14px 42px rgba(0,0,0,.2)
}
.card h2,.card h3{margin:7px 0 9px;letter-spacing:-.035em}
.card h2{font-size:23px}.card h3{font-size:18px}
.card p{color:#aab4ae;line-height:1.5;font-size:13px}
.stack{display:grid;gap:12px}
.row{display:flex;align-items:center;justify-content:space-between;gap:14px}
.list{display:grid;gap:9px;margin-top:14px}
.item{
  border-top:1px solid rgba(255,255,255,.065);padding-top:11px;
  display:grid;gap:4px
}
.item strong{font-size:13px}.item small{color:#a4afa8;font-size:11px;line-height:1.45}.item p{margin:2px 0 0}
.stat{font-size:42px;font-weight:950;letter-spacing:-.055em;margin-top:8px;color:var(--accent3)}
.pill{
  display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border-radius:999px;
  border:1px solid rgba(231,185,143,.24);background:rgba(213,161,115,.08);
  color:var(--accent3);font-size:10px;font-weight:950;letter-spacing:.08em
}
.btn{
  border:0;border-radius:14px;padding:13px 16px;background:linear-gradient(180deg,var(--accent2),var(--accent));
  color:#17110c;font-weight:950;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  box-shadow:0 11px 30px rgba(213,161,115,.14);cursor:pointer
}
.btn.secondary{background:#111b20;color:#e5ebe7;border:1px solid rgba(255,255,255,.1);box-shadow:none}
.btn:active{transform:scale(.985)}
.input,.select{
  width:100%;min-height:48px;border:1px solid rgba(255,255,255,.11);border-radius:13px;
  background:#091116;color:#f3f6f4;padding:0 13px;outline:none
}
.input:focus,.select:focus{border-color:rgba(231,185,143,.5);box-shadow:0 0 0 3px rgba(213,161,115,.07)}
label{display:grid;gap:7px;color:#c3ccc6;font-size:11px;font-weight:850}
.status{
  border:1px solid rgba(255,255,255,.08);background:#0a1216;border-radius:14px;padding:13px;
  color:#a9b4ad;font-size:11px;line-height:1.5
}
.status.warning{border-color:rgba(223,136,127,.26);color:#efb0a8}
.muted{color:#8f9b94;font-size:11px}
.exercise-image{
  width:100%;aspect-ratio:16/10;object-fit:contain;border-radius:15px;margin-bottom:13px;
  background:#0b1215;border:1px solid rgba(255,255,255,.06)
}
.quick-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}
.quick-actions .btn{min-height:44px}
.section-title{margin:28px 2px 0}.section-title h2{margin:5px 0 0;font-size:26px;letter-spacing:-.04em}
.section-title p{color:var(--muted);font-size:12px}
.progress-track{height:7px;border-radius:999px;background:#1a2429;overflow:hidden}
.progress-track span{display:block;height:100%;background:var(--accent);border-radius:inherit}
@media(max-width:640px){
  .shell{padding-left:12px;padding-right:12px}.top{margin-bottom:16px}.back{font-size:11px}
  .hero{padding:22px;border-radius:24px}.hero h1{font-size:43px}
  .grid,.grid.two{grid-template-columns:1fr}
  .card{padding:17px;border-radius:19px}
  .row{align-items:flex-start;flex-direction:column}
  .quick-actions{display:grid;grid-template-columns:1fr}.quick-actions .btn{width:100%}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

@media(max-width:640px){
  .btn,button,.input,.select{min-height:44px}
  .top{padding-top:max(0px,env(safe-area-inset-top))}
  .card,.hero{overflow-wrap:anywhere}
  .exercise-image{max-height:46vh}
}
@supports(padding:max(0px)){.shell{padding-bottom:max(48px,calc(env(safe-area-inset-bottom) + 28px))}}

/* HYBRI8 MOBILE QA HARDENING */
.btn{min-height:46px;touch-action:manipulation}
button,.btn,.input,.select{max-width:100%}
.card,.hero,.item,.row{min-width:0}
.card h2,.card h3,.card p,.item strong,.item small,.pill{overflow-wrap:anywhere}
.pill{white-space:normal;text-align:center}
button:disabled{opacity:.48;cursor:not-allowed}
@media(max-width:420px){
  .shell{padding-left:10px;padding-right:10px}
  .hero{padding:19px}
  .hero h1{font-size:39px}
  .card{padding:15px}
  .stat{font-size:36px}
  .grid,.grid.two{gap:10px}
}

/* TOUCH TARGET CONTRACT */
button,.btn{min-height:44px}

.hybri8-feature-nav{position:fixed;left:50%;bottom:max(8px,env(safe-area-inset-bottom));transform:translateX(-50%);z-index:60;display:grid;grid-template-columns:repeat(5,1fr);width:min(520px,calc(100% - 20px));padding:7px;border:1px solid rgba(231,185,143,.16);border-radius:20px;background:rgba(8,15,19,.9);backdrop-filter:blur(18px);box-shadow:0 18px 50px rgba(0,0,0,.38)}.hybri8-feature-nav a{min-height:46px;display:grid;place-items:center;gap:2px;color:#8f9b94;text-decoration:none;border-radius:14px;font-weight:800}.hybri8-feature-nav a span{font-size:17px}.hybri8-feature-nav a small{font-size:10px}.hybri8-feature-nav a.active{background:rgba(213,161,115,.1);color:var(--accent3)}body:has(.hybri8-feature-nav) .shell{padding-bottom:max(100px,calc(env(safe-area-inset-bottom) + 96px))}

/* RC4 ACCESSIBILITY + BROWSER HARDENING */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
:focus-visible{outline:3px solid var(--accent2);outline-offset:3px;border-radius:8px}
a:focus:not(:focus-visible),button:focus:not(:focus-visible),input:focus:not(:focus-visible),select:focus:not(:focus-visible){outline:none}
@media(max-width:640px){input,select,textarea{font-size:16px}}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
@media(prefers-contrast:more){
  :root{--line:rgba(255,255,255,.34);--muted:#c4cdc8}
  .card,.hero,.status,.pill{border-width:2px}
}
@supports(font-size:clamp(1rem,2vw,1.2rem)){
  body{font-size:clamp(1rem,.96rem + .2vw,1.08rem)}
}
input,select,button,.btn,a{touch-action:manipulation}


/* DESKTOP FEATURE WORKSPACE X4 — wide canvas + left rail, mobile/tablet untouched */
@media(min-width:1180px){
  body:has(.hybri8-feature-nav){padding-bottom:0}
  body:has(.hybri8-feature-nav) .shell{
    width:min(1380px,calc(100% - 220px));
    min-height:100vh;
    padding:max(env(safe-area-inset-top),18px) 24px 56px;
  }
  body:has(.hybri8-feature-nav) .top{
    height:70px;
    margin:0 0 6px;
    padding:0 2px;
    background:linear-gradient(180deg,rgba(7,16,22,.97) 0%,rgba(7,16,22,.82) 68%,rgba(7,16,22,0) 100%);
    backdrop-filter:blur(22px) saturate(1.08);
    -webkit-backdrop-filter:blur(22px) saturate(1.08);
  }
  .hybri8-feature-nav{
    left:max(18px,calc((100vw - 1640px)/2));
    top:50%;
    bottom:auto;
    transform:translateY(-50%);
    width:84px;
    grid-template-columns:1fr;
    gap:5px;
    padding:8px;
    border-radius:24px;
    background:rgba(8,15,19,.94);
    border-color:rgba(255,255,255,.12);
    box-shadow:0 22px 64px rgba(0,0,0,.46),0 1px 0 rgba(255,255,255,.035) inset;
  }
  .hybri8-feature-nav a{
    position:relative;
    min-height:68px;
    padding:7px 4px;
    border-radius:17px;
    line-height:1.1;
  }
  .hybri8-feature-nav a span{font-size:20px;line-height:1}
  .hybri8-feature-nav a small{font-size:10px}
  .hybri8-feature-nav a.active{
    color:var(--accent3);
    background:linear-gradient(180deg,rgba(213,161,115,.15),rgba(213,161,115,.07));
    box-shadow:0 1px 0 rgba(255,255,255,.04) inset;
  }
  .hybri8-feature-nav a.active::after{
    content:"";
    position:absolute;
    left:5px;
    top:18px;
    bottom:18px;
    width:2px;
    border-radius:999px;
    background:linear-gradient(180deg,transparent,var(--accent2),transparent);
    box-shadow:0 0 14px rgba(231,185,143,.34);
  }
  .hybri8-feature-nav a:focus-visible{
    outline:2px solid var(--accent2);
    outline-offset:2px;
  }
}
@media(min-width:1500px){
  body:has(.hybri8-feature-nav) .shell{width:min(1440px,calc(100% - 220px))}
}
@media(hover:hover) and (pointer:fine) and (min-width:1180px){
  .hybri8-feature-nav a{transition:background 160ms ease,color 160ms ease,transform 160ms ease}
  .hybri8-feature-nav a:hover{background:rgba(255,255,255,.035);color:#dce4de}
  .hybri8-feature-nav a:active{transform:scale(.97)}
}
@media(min-width:1180px) and (max-height:720px){
  .hybri8-feature-nav{gap:3px;padding:7px}
  .hybri8-feature-nav a{min-height:58px}
  .hybri8-feature-nav a.active::after{top:14px;bottom:14px}
}
